I have created a virtual environment for my project. The folder structure is like this
|--- desktop
|--- project
|--- main.py
|--- venv
|--- bin
When I use the terminal to activate the virtual environment (Python 3.5.2) and then run my main.py
everything works just fine.
Recently, I downloaded PyCharm. After downloading and installing PyCharm I thought it would be better to move the venv
folder into the project folder such that the new folder structure is:
|--- desktop
|--- project
|--- venv
|--- bin
|--- main.py
When I try to activate the virtual environment I do not get the proper Python version (2.7.12 instead of 3.5.2) and I am not able to run my main.py
because the new virtual environment does not have all the modules that I have normally installed in my real virtual environment. The project settings still say that I am using the real virtual environment with python 3.5.2.
Edit: I have also tried all the answers in from this post: PyCharm cannot find the packages in virtualenv. I am also not able to create a new venv from the one that is already existing. If I select the folder of the venv outside it does not allow me to apply the changes (button is disabled).
Comments
Post a Comment