Open ebresie opened 2 years ago
From https://medium.com/@dbrailo/virtual-environments-in-python-2773ac8dd9ae
As of Python 3.3 can create vend with
python3 -m venv name-of-venv
May need to have a New..venv option used within the project folder and an activate/deactivate option
Avoid checking in venv folders (i.e. add to gitignore)
"Pip list in the environment will list its modules/packages"
New requirements.txt may be an option or used when adding dependencies indirectly
"To install the requirements.txt, run:
"pip3 install -r requirements.txt"
"to create the requirements.txt to have all the dependencies you have installed for that project, you can easily run:
"pip3 freeze > requirements.txt And you will have the .txt with all the dependencies and its versions inside."
"basic process of using a venv is to create it → activate it → install the libraries we need / installing the requirements.txt → deactivate"
Maybe can also use when setting up LSP server
Based on Python Virtual Environment Primer
Have to accommodate multiple flavors of "venv" (i.e. standard python venv module, conda and virtualenv. May need a "virutal environment interface" with implementation for each of the above flavors.
Need to decide if should include venv within the list of platforms or keep them separately. The benefits of coming is for all practical purposes a venv is another "instance" of a python platform with specific pre-included dependencies and could be treated as such but the draw back is the baseline pythons and the venv could provide excessive configurations which may get confusing as more environments are setup. Maybe a combination is to have a check box to include venvs
May want to leverage a "venv" with the LSP modules included for use in plugin functionality.
May need to consider egg/wheel packaging. See https://packaging.python.org/en/latest/discussions/wheel-vs-egg/ but this may be separate from virtual environments.
This feature would be to provide a user interface to interface with Virtual Environments. This may be a sub-case of Python Platform functionality.
It may need to account for basic python virtual environments as well as anaconda-based environments
References