python-intermediate-development
python-intermediate-development copied to clipboard
Virtual Environments and Conda
A good number of learners are using Conda as their Python, and have expressed concern over using pip and virtualenvs.
As far as I know you can just do python -m venv venv as normal within conda and whilst you will technically be using a venv within a conda env it doesn't actually matter. It's probably worth calling this out.
I am one of the learners who usually uses conda. I went this way to create in a conda environment a new Python venv. Now I am using the pip from the venv and not from the conda environment. A bit odd, but it works.
So far, I have seen only one drawback. I do the exercises with VScode and sometimes I it opens a new terminal in VScode switch back to the base conda environment and not keeping my new venv.
The PyCharm bit needs this environment variable set to work CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 .
We moved away from using conda in the material and it woul be a big over head to support it as well. I suggest we put this under Troubleshooting and instructors Notes to make people teaching it aware.
I'd probably keep it in the main text as a callout, as even if we don't recommend Conda a lot of people will still be using it.
Callout is good as well @smangham
Also see #346 - this may be helpful. Closing this issue.