Python virtualenvwrapper - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Python virtualenvwrapper (/thread-26822.html) |
Python virtualenvwrapper - Pedroski55 - May-14-2020 I am reading a book called Python Automation Cookbook. First thing it mentions is getting a virtual environment set up. I installed Python virtualenvwrapper But I am getting this message when I start Ubuntu and when I start bash: Quote:/usr/bin/python: No module named virtualenvwrapper I have installed virtualenvwrapper: Quote:pedro@pedro-512ssd:~$ pip3 install virtualenvwrapper In /home/pedro/.local/bin/ I have virtualenvwrapper.sh, virtualenv and virtualenvwrapper_lazy.sh What should I do to set the path right? In /home/pedro/.profle I followed the instructions to add this: Quote:export WORKON_HOME=~/.virtualenvs I also put the above in .bashrc But I am still getting the error message. What should I do?? The virtual environment seems to be working: Quote:pedro@pedro-512ssd:~$ source .virtualenvs/automation_cookbook/bin/activate RE: Python virtualenvwrapper - menator01 - May-15-2020 This should get you started with virtual enviroments https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/ Personally I would uninstall that package and use this. Only because I'm familiar with this one. RE: Python virtualenvwrapper - snippsat - May-15-2020 Python comes with virtual environment build in venv,so no need to install anything. # Make tom@tom:~$ python -m venv my_env # Cd in tom@tom:~$ cd my_env/ # Activate tom@tom:~/my_env$ source bin/activate # Test pip (my_env) tom@tom:~/my_env$ pip -V pip 19.2.3 from /home/tom/my_env/lib/python3.8/site-packages/pip (python 3.8)Windows. # Make G:\code λ python -m venv my_env # Cd in G:\code λ cd my_env\ # Activate G:\code\my_env λ G:\code\my_env\Scripts\activate # Test pip (my_env) G:\code\my_env λ pip -V pip 20.0.1 from g:\code\my_env\lib\site-packages\pip (python 3.7) |