Lösung, wenn die Berechtigung von pip verweigert wird pyopenssl installieren
~ pip install pyopenssl
Collecting pyopenssl
  Using cached pyOpenSSL-16.1.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /usr/local/lib/python2.7/site-packages (from pyopenssl)
Collecting cryptography>=1.3.4 (from pyopenssl)
  Using cached cryptography-1.5.2-cp27-cp27m-macosx_10_10_intel.whl
Collecting enum34 (from cryptography>=1.3.4->pyopenssl)
  Using cached enum34-1.1.6-py2-none-any.whl
Collecting ipaddress (from cryptography>=1.3.4->pyopenssl)
  Using cached ipaddress-1.0.17-py2-none-any.whl
Collecting idna>=2.0 (from cryptography>=1.3.4->pyopenssl)
  Using cached idna-2.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools>=11.3 in /usr/local/lib/python2.7/site-packages (from cryptography>=1.3.4->pyopenssl)
Collecting cffi>=1.4.1 (from cryptography>=1.3.4->pyopenssl)
  Using cached cffi-1.8.3-cp27-cp27m-macosx_10_10_intel.whl
Collecting pyasn1>=0.1.8 (from cryptography>=1.3.4->pyopenssl)
  Using cached pyasn1-0.1.9-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.4.1->cryptography>=1.3.4->pyopenssl)
Installing collected packages: enum34, ipaddress, idna, pycparser, cffi, pyasn1, cryptography, pyopenssl
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 742, in install
    **kwargs
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 831, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 1032, in move_wheel_files
    isolated=self.isolated,
  File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 346, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 324, in clobber
    shutil.copyfile(srcfile, destfile)
  File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/lib/python2.7/site-packages/enum/__init__.py'
Auf der Suche nach `sudo chown -R $ USER / lib / python2.7 / site-packages /` Was soll ich tun?
Es gab auch eine Methode, aber es fühlt sich schlecht an, den Besitz eines solchen systemweiten Ordners einfach zu ändern.
Als ich nach einem anderen Weg suchte, kam ich zu folgendem.
http://stackoverflow.com/questions/25816674/pip-is-not-able-to-install-packages-correctly-permission-denied-error
pip install pyopenssl --userDu kannst es benutzen.
Nur für den Fall bestätigt.
~ pip install --user
--user   Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.)
Und das.
~ pip install pyopenssl --user
Collecting pyopenssl
  Using cached pyOpenSSL-16.1.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /usr/local/lib/python2.7/site-packages (from pyopenssl)
Collecting cryptography>=1.3.4 (from pyopenssl)
  Using cached cryptography-1.5.2-cp27-cp27m-macosx_10_10_intel.whl
Collecting enum34 (from cryptography>=1.3.4->pyopenssl)
  Using cached enum34-1.1.6-py2-none-any.whl
Collecting ipaddress (from cryptography>=1.3.4->pyopenssl)
  Using cached ipaddress-1.0.17-py2-none-any.whl
Collecting idna>=2.0 (from cryptography>=1.3.4->pyopenssl)
  Using cached idna-2.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools>=11.3 in /usr/local/lib/python2.7/site-packages (from cryptography>=1.3.4->pyopenssl)
Collecting cffi>=1.4.1 (from cryptography>=1.3.4->pyopenssl)
  Using cached cffi-1.8.3-cp27-cp27m-macosx_10_10_intel.whl
Collecting pyasn1>=0.1.8 (from cryptography>=1.3.4->pyopenssl)
  Using cached pyasn1-0.1.9-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.4.1->cryptography>=1.3.4->pyopenssl)
Installing collected packages: enum34, ipaddress, idna, pycparser, cffi, pyasn1, cryptography, pyopenssl
Successfully installed cffi-1.8.3 cryptography-1.5.2 enum34-1.1.6 idna-2.1 ipaddress-1.0.17 pyasn1-0.1.9 pycparser-2.14 pyopenssl-16.1.0
Gut.
http://stackoverflow.com/questions/7143077/how-can-i-install-packages-in-my-home-folder-with-pip/7143496#7143496 http://stackoverflow.com/questions/25816674/pip-is-not-able-to-install-packages-correctly-permission-denied-error
Recommended Posts