In order
1. I install Virtual environment virtualenv v via Terminal
2. I activate it in the source v/bin/activate
3. Activation works, in the terminal as it should be displayed (v)
But the environment itself does not work. With the pip3 freeze command, it shows all the packages installed on pip3 and when installing for example pip3 install numpy package is installed globally. The environment is created only under pip and not under pip3 . Google found the following option: set the environment in this way:
virtualenv -p /usr/bin/python3.6 venv . In this case, the environment is set for pip3 but despite the fact that pip3 freeze shows only those packages that I put in the environment, when the script starts, it does not see them. Tell me how to get out of the problem.

  • OS Linux. Put sudo pip3 install virtualenv - IT-KOT 8:26 pm
  • Show the exact sequence of actions from creating virtualenv (the option with -p is correct, if that) before unsuccessful launch of the script with numpy - copying text from the terminal or at least a screenshot - andreymal

1 answer 1

  1. Install virtualenv:

     python3 -m pip install --user virtualenv 
  2. Create virtualenv:

     python3 -m virtualenv env 
  3. Activate virtualenv:

     source env/bin/activate 
  4. Quit virtualenv:

     deactivate 
  • Forgot to specify my Linux. Will it work? - IT-KOT
  • Yes, it is just for him - Sergiy Budz
  • Ie now package for pip3 virtualenv to remove? - IT-KOT
  • Well, yes, delete, and install as I have registered - Sergiy Budz
  • Installed, activated, then checked through pip3 freeze there are no packages. I installed pip3 numpy, then checked through pip3 freeze, the package was delivered. I run a script where import numpy as np and it gives out that there is no such module. - IT-KOT