Fehler "Berechtigung verweigert" bei Verwendung der Pip-Installation in virtualenv

Edit: FIXED!

Nur das .cache-Verzeichnis muss gechown werden

Ich habe das @ ausprobievirtualenvwrapper docs Anleitung, ich habe versuchtthis guy Anweisungen ebenso gut wiedies...Ich habe es versuchtsudo pip uninstall virtualenv , sudo pip uninstall virtualenvwrapper, sudo pip3 uninstall virtualenv, sudo pip3 uninstall virtualenvwrapper, bevor Sie die einzelnen Anweisungen ausführen. Ich habe mir andere SO Posts wie @ angeschadiese, aber das Sudo-Problem ist nicht das gleiche wie mein eigenes. Damit meine ich, dass ich nicht sudo verwende, wenn ich die virtuelle Version erstelle, und wenn ich versuche, ein Paket mit sudo zu installieren, wird nur gesagt, dass ich das Paket bereits installiert habe (außerhalb der virtuellen Version).

Ich habe auch versucht zu tunpip install --user virtualenv(wrapper)

Hier ist was ich getan habe:

~ $ sudo pip3 install virtualenv
Downloading/unpacking virtualenv
  Downloading virtualenv-13.0.3-py2.py3-none-any.whl (1.7MB): 1.7MB downloaded
Installing collected packages: virtualenv
Successfully installed virtualenv
Cleaning up...
~ $ mkdir ~/.virtualenvs
~ $ sudo pip3 install virtualenvwrapper
Downloading/unpacking virtualenvwrapper
  Downloading virtualenvwrapper-4.5.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /usr/local/lib/python3.4/dist-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): stevedore in /usr/local/lib/python3.4/dist-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/local/lib/python3.4/dist-packages (from virtualenvwrapper)
Installing collected packages: virtualenvwrapper
Successfully installed virtualenvwrapper
Cleaning up...
~ $ export WORKON_HOME=~/.virtualenvs/

Dann habe ich diese beiden Zeilen zu meinem .bashrc hinzugefügt: (Ich habe auch versucht, @ einzustelleVIRTUALENVWRAPPER_PYTHON zu/usr/bin/python)

source /usr/local/bin/virtualenvwrapper.sh
VIRTUALENVWRAPPER_PYTHON='/usr/bin/python3'

Next Ich habe Folgendes versucht:

~ $ mkvirtualenv test
New python executable in test/bin/python
Installing setuptools, pip, wheel...done.
(test)~ $ pip install numpy
Collecting numpy
  Using cached numpy-1.9.2.tar.gz
Building wheels for collected packages: numpy
Exception:
Traceback (most recent call last):
  File "/home/aweeeezy/.virtualenvs/test/local/lib/python2.7/site-packages/pip/basecommand.py", line 223, in main
    status = self.run(options, args)
  File "/home/aweeeezy/.virtualenvs/test/local/lib/python2.7/site-packages/pip/commands/install.py", line 291, in run
    wb.build(autobuilding=True)
  File "/home/aweeeezy/.virtualenvs/test/local/lib/python2.7/site-packages/pip/wheel.py", line 754, in build
    ensure_dir(output_dir)
  File "/home/aweeeezy/.virtualenvs/test/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 70, in ensure_dir
    os.makedirs(path)
  File "/home/aweeeezy/.virtualenvs/test/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/home/aweeeezy/.virtualenvs/test/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/home/aweeeezy/.virtualenvs/test/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/home/aweeeezy/.virtualenvs/test/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/home/aweeeezy/.cache/pip/wheels/4b'

Warum kann virtualenv nicht einfach funktionieren?

Antworten auf die Frage(4)

Ihre Antwort auf die Frage