Scrapy 我升级了pyOpenSSL,但它仍然是0.13.1版本。无法升级到18.0.0

Scrapy 我升级了pyOpenSSL,但它仍然是0.13.1版本。无法升级到18.0.0,scrapy,pip,web-crawler,Scrapy,Pip,Web Crawler,我正在尝试获取pyOpenSSL 18.0.0,但它不起作用。以下是我的命令: sudo pip install pyOpenSSL==18.0.0 我明白了: The directory '/Users/mac/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permission

我正在尝试获取pyOpenSSL 18.0.0,但它不起作用。以下是我的命令:

sudo pip install pyOpenSSL==18.0.0
我明白了:

The directory '/Users/mac/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/mac/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.
Requirement already satisfied: pyOpenSSL==18.0.0 in ./Library/Python/2.7/lib/python/site-packages (18.0.0)
Requirement already satisfied: six>=1.5.2 in /Library/Python/2.7/site-packages (from pyOpenSSL==18.0.0) (1.11.0)
Requirement already satisfied: cryptography>=2.2.1 in ./Library/Python/2.7/lib/python/site-packages (from pyOpenSSL==18.0.0) (2.4.2)
Requirement already satisfied: idna>=2.1 in /Library/Python/2.7/site-packages (from cryptography>=2.2.1->pyOpenSSL==18.0.0) (2.7)
Requirement already satisfied: enum34; python_version < "3" in ./Library/Python/2.7/lib/python/site-packages (from cryptography>=2.2.1->pyOpenSSL==18.0.0) (1.1.6)
Requirement already satisfied: cffi!=1.11.3,>=1.7 in ./Library/Python/2.7/lib/python/site-packages (from cryptography>=2.2.1->pyOpenSSL==18.0.0) (1.11.5)
Requirement already satisfied: asn1crypto>=0.21.0 in ./Library/Python/2.7/lib/python/site-packages (from cryptography>=2.2.1->pyOpenSSL==18.0.0) (0.24.0)
Requirement already satisfied: ipaddress; python_version < "3" in ./Library/Python/2.7/lib/python/site-packages (from cryptography>=2.2.1->pyOpenSSL==18.0.0) (1.0.22)
Requirement already satisfied: pycparser in ./Library/Python/2.7/lib/python/site-packages (from cffi!=1.11.3,>=1.7->cryptography>=2.2.1->pyOpenSSL==18.0.0) (2.19)
我得到:

pyOpenSSL    0.13.1

sudo
命令可能使pip将该版本的
pyopenssl
安装到
root
用户的站点软件包中。只需运行
pip install pyOpenSSL==18.0.0
(在虚拟环境之外)即可将其安装到当前用户的站点包中


顺便说一下,您应该考虑使用虚拟环境来更好地管理Python项目。为此,请参考{}。

事实上,这是最佳做法。我现在用它。非常感谢。
pyOpenSSL    0.13.1