Dear Python community.
the issue I am facing is i am not able to activate a virtual env. using Pycharm app.
Please not the following:
- I have a folder with a project running python/Django, named “Production” copied in an external hard drive, the project folder was copied from a ubuntu server running in a primary testing server.
- Then, I created and config a second testing server running the latest LTS Ubuntu version and install python, pycharm, Django, postgresql;
- Then I copied the project folder named “Production” I have in the external hard drive to the /home/user_folder/ folder location in Ubunto server. So, the route I copied the folder is the following /home/user_folder/Production.
- The folder “Production” had a folder name venv, what was the virtual environment on the primary testing server. But I renamed that folder to venv_old, to I created a new virtual env on second testing server,
- The new virtual env I created by clicking on pycharm “File” menu, then go to “Settings”, go to “Python Interpreter” and finally click on “Add Interpreter.”
- On the “Add Python Interpreter” windows I checked the checkbox “Inherit global site-packages”. You can refer to image below.
- Then a new venv folder was created inside the “Production” folder
- On the pycharm I go to terminal and navigate until the venv folder just created. Inside of it I have the bin folder and inside of it I have the activate filed, activate, activate.csh, activate.fish, activate.ps1, among other.
- But when I run: ~/production$ venv/bin/activate the terminal shows a message Permission denied (commando Permissão negada) since the server is setting in Portuguese.
- But when I run ~/production$ venv/bin/activate the terminal shows a message command not found (commando não encontrado) since the server is setting in Portuguese.
- Note when I run $python3 --version, it shows Python 3.12.3
- When I run # pip --version, it shows pip 24.0 from /user/lib/python3/dist-packages/pip (python3.12)
I have no idea why I am getting the error “Command not found” when try to activate my virtual env. If someone can give me help, I will really appreciate.
Thanks in advance.