django - It didn't want to install in my virtualenv -
(goat) ┌─╼ [~/projects/personal_projects/goat_tdd_project/superlists] └╼ pip3 install django-extensions collecting django-extensions using cached django_extensions-1.9.0-py2.py3-none-any.whl requirement satisfied: six>=1.2 in /home/jeremie/.local/lib/python3.5/site-packages (from django-extensions) installing collected packages: django-extensions exception: traceback (most recent call last): file "/home/jeremie/.local/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) file "/home/jeremie/.local/lib/python3.5/site-packages/pip/commands/install.py", line 342, in run prefix=options.prefix_path, file "/home/jeremie/.local/lib/python3.5/site-packages/pip/req/req_set.py", line 784, in install **kwargs file "/home/jeremie/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 851, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) file "/home/jeremie/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files isolated=self.isolated, file "/home/jeremie/.local/lib/python3.5/site-packages/pip/wheel.py", line 345, in move_wheel_files clobber(source, lib_dir, true) file "/home/jeremie/.local/lib/python3.5/site-packages/pip/wheel.py", line 316, in clobber ensure_dir(destdir) file "/home/jeremie/.local/lib/python3.5/site-packages/pip/utils/__init__.py", line 83, in ensure_dir os.makedirs(path) file "/usr/lib/python3.5/os.py", line 241, in makedirs mkdir(name, mode) permissionerror: [errno 13] permission denied: '/usr/lib/python3.5/site-packages/django_extensions'
i trying understand why have issue when try install django-extensions
. yet in virtualenv (wrapper) goat
, didn't want install in it. how fix that?
update
with ls -ld
on virtualenv, got
drwxrwxr-x 7 jeremie jeremie 4096 sep 9 17:10 goat
this problem can occur of created virtualenv root.
if so, fix it, can run command:
sudo chown -r your_username:your_username path/to/virtuaelenv/
update
the other reason can occur when have installed pip (or pip3 in case) root.
from error can see trying install package outside of virtualenv, @ root level.
to verify this, check permissions of pip installation:
user@host:~$ pip3 /usr/local/bin/pip3 user@host:~$ ls -l /usr/local/bin/pip3 -rwxr-xr-x 1 root root ... etc, etc
or run one-liner:
ls -l `which pip3`
you can fix uninstalling pip3, , reinstalling without using sudo command.
Comments
Post a Comment