Answer the question
In order to leave comments, you need to log in
How to run a virtual environment on linux?
How to run a virtual environment on linux?
First installed pip: sudo apt-get install python3-pip
Then virtualenv: sudo pip3 install virtualenv
Then created: virtualenv venv
Then entered the command: virtualenv -p /usr/bin/python2.7 venv
But when I wanted to run: source venv/bin/ activate
gave an error, how to fix it?
----->
[email protected]:~/Documents/python/progr$ virtualenv -p /usr/bin/python2.7 vitrual
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /home/vlad/Documents/python/progr/vitrual/bin/python2.7
Not overwriting existing python script /home/vlad/Documents/python/progr/vitrual/bin/python (you must use /home/vlad/Documents/python/progr/vitrual/bin/python2.7)
Traceback (most recent call last ):
File "", line 1, in
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 11: ordinal not in range(128)
/usr/local/lib/python2.7/dist-packages/virtualenv. py:1505: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
if proc_stdout != norm_home_dir:
ERROR: The executable /home/vlad/Documents/python/progr/vitrual/bin/python2.7 is not functioning
ERROR: It thinks sys.prefix is '/home/vlad/\xd0\x94\xd0\xbe\xd0\xba\xd1\x83\xd0\xbc\xd0\xb5\xd0\xbd\xd1\x82\xd1\x8b /python/progr' (should be u'/home/vlad/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/python/progr/vitrual')
ERROR: virtualenv is not compatible with this system or executable
[email protected]:~/Documents/python/progr$ source virtual/bin/activate
bash: virtual/bin/activate: No such file or directory
[email protected]:~/Documents/python /progr$ ^C
[email protected]:~/Documents/python/progr$
Answer the question
In order to leave comments, you need to log in
Remove Russian letters in folder names and everything will be ok
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question