Я хочу использовать virtualenv
с Python 3 в Ubuntu 18.04. В частности, я использую Python 3.6.6 и virtualenv 16.0.0.
Я установил virtualenv с помощью sudo
, как было предложено в ответах здесь : sudo pip3 install --upgrade virtualenv
Я создал новый virtualenv, используя python3 -m virtualenv venv
. И активировал как обычно: источник venv / bin / activate
.
Когда я пытаюсь установить свой проект Python с помощью python setup.py install
, я получаю следующее сообщение об ошибке:
running install
running bdist_egg
running egg_info
error: [Errno 13] Permission denied
Если я использую sudo
для создания virtualenv на шаге 2 , то на шаге 3 я получаю другое сообщение об ошибке:
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/home/stefan/git-repos/tng-sdk-project/venv/lib/python3.6/site-packages/test-easy-install-3769.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/home/stefan/git-repos/tng-sdk-project/venv/lib/python3.6/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://setuptools.readthedocs.io/en/latest/easy_install.html
Please make the appropriate changes for your system and try again.
Я уже несколько часов гуглил и пробовал разные вещи, но не могу заставить его работать должным образом. Похоже, что бы я ни пытался, все чаще возникают новые ошибки ... Есть идеи?
Ну, sudo python setup.py install
работает внутри virtualenv, но это не может быть решением.