Skip to content

How to scan a file system containing multiple Python projects for license information #7734

Answered by knqyf263
goneall asked this question in Q&A
Discussion options

You must be logged in to vote

I tried to find a way to detect a virtual environment without activating it, but no luck.
https://stackoverflow.com/questions/22003769/get-virtualenvs-bin-folder-path-from-script

Also, the virtualenv path differs depending on tools.

root@6e6d7714820b:/myproject# poetry env info

Virtualenv
Python:         3.12.7
Implementation: CPython
Path:           /root/.cache/pypoetry/virtualenvs/myproject-tjKdtegc-py3.12
Executable:     /root/.cache/pypoetry/virtualenvs/myproject-tjKdtegc-py3.12/bin/python
Valid:          True

Base
Platform:   linux
OS:         posix
Python:     3.12.7
Path:       /usr/local
Executable: /usr/local/bin/python3.12

I wonder if there is a uniform way of identifying th…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@DmitriyLewen
Comment options

@goneall
Comment options

Answer selected by goneall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
triage/support Indicates an issue that is a support question.
3 participants