I attempt to deploy a Python package with pip
in a virtual environment on an Ubuntu machine, but encounter a permission-related issue. For example:
(TestVirtualEnv)test@testServer:~$ pip install markdown2
terminates by:
error: could not create '/home/test/virtualenvs/TestVirtualEnv/lib/python3.3/site-packages/markdown2.py': Permission denied
I can't sudo
, since it will install the package globally, and not within the virtual environment. I chown
ed site-packages
; ls
shows only directories related to easy_install
, pip
and setuptools
, and nothing related to Markdown.
How to deploy a package in a virtual environment with pip
without encountering permission-related errors?
sudo
? – Scalesudo
. – Scalesudo
. Indeed, the package installs correctly now. Please, can you promote your comment to an answer so I can accept it? – Airlessvirtualenv
directory, because you can activatevirtualenv
with other user, but it won't let you install any packages and will give permission access. – Electroacoustics