pip安装paramiko失败_Macos版本10.11.6

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pip安装paramiko失败_Macos版本10.11.6相关的知识,希望对你有一定的参考价值。

报错信息:

sudo pip install cryptography

Password:

The directory ‘/Users/wanghao/Library/Caches/pip/http‘ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo‘s -H flag.

The directory ‘/Users/wanghao/Library/Caches/pip‘ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo‘s -H flag.

Collecting cryptography

/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for pypi.python.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)

  SubjectAltNameWarning

/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for pypi.python.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)

  SubjectAltNameWarning

  Downloading cryptography-1.6-cp27-cp27m-macosx_10_10_intel.whl (2.4MB)

    100% |████████████████████████████████| 2.4MB 319kB/s 

Requirement already satisfied: cffi>=1.4.1 in /Library/Python/2.7/site-packages (from cryptography)

Requirement already satisfied: pyasn1>=0.1.8 in /Library/Python/2.7/site-packages (from cryptography)

Collecting setuptools>=11.3 (from cryptography)

/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for pypi.python.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)

  SubjectAltNameWarning

/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for pypi.python.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)

  SubjectAltNameWarning

  Downloading setuptools-30.0.0-py2.py3-none-any.whl (472kB)

    100% |████████████████████████████████| 481kB 434kB/s 

Requirement already satisfied: six>=1.4.1 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from cryptography)

Collecting idna>=2.0 (from cryptography)

/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for pypi.python.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)

  SubjectAltNameWarning

/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for pypi.python.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)

  SubjectAltNameWarning

  Downloading idna-2.1-py2.py3-none-any.whl (54kB)

    100% |████████████████████████████████| 61kB 311kB/s 

Collecting ipaddress (from cryptography)

/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for pypi.python.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)

  SubjectAltNameWarning

/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for pypi.python.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)

  SubjectAltNameWarning

  Downloading ipaddress-1.0.17-py2-none-any.whl

Collecting enum34 (from cryptography)

/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for pypi.python.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)

  SubjectAltNameWarning

/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for pypi.python.org has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)

  SubjectAltNameWarning

  Downloading enum34-1.1.6-py2-none-any.whl

Requirement already satisfied: pycparser in /Library/Python/2.7/site-packages (from cffi>=1.4.1->cryptography)

Installing collected packages: setuptools, idna, ipaddress, enum34, cryptography

  Found existing installation: setuptools 1.1.6

    Uninstalling setuptools-1.1.6:

Exception:

Traceback (most recent call last):

  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main

    status = self.run(options, args)

  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run

    prefix=options.prefix_path,

  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install

    requirement.uninstall(auto_confirm=True)

  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall

    paths_to_remove.remove(auto_confirm)

  File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove

    renames(path, new_path)

  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, in renames

    shutil.move(old, new)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move

    copytree(src, real_dst, symlinks=True)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree

    raise Error, errors

Error: [(‘/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py‘, ‘/tmp/pip-g0vvgD-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py‘, "[Errno 1] Operation not permitted: ‘/tmp/pip-g0vvgD-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py‘"), (‘/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc‘, ‘/tmp/pip-g0vvgD-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc‘, "[Errno 1] Operation not permitted: ‘/tmp/pip-g0vvgD-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc‘"), (‘/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py‘, ‘/tmp/pip-g0vvgD-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py‘, "[Errno 1] Operation not permitted: ‘/tmp/pip-g0vvgD-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py‘"), (‘/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc‘, ‘/tmp/pip-g0vvgD-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc‘, "[Errno 1] Operation not permitted: ‘/tmp/pip-g0vvgD-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc‘"), (‘/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib‘, ‘/tmp/pip-g0vvgD-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib‘, "[Errno 1] Operation not permitted: ‘/tmp/pip-g0vvgD-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib‘")]

 

解决方法:


pip install paramiko  --ignore-installed

以上是关于pip安装paramiko失败_Macos版本10.11.6的主要内容,如果未能解决你的问题,请参考以下文章

在 MacOS 上安装 psycopg2 失败,错误消息不明确

我用`pip install paramiko`安装了paramiko,但无法导入paramiko [重复]

macOS pip安装pyspider无法正常启动的问题

pip3 安装 PyYAML 失败。(python3.7,macOS High Sierra)

macOS 10.11.* 安装scrapy

python3导入paramiko模块