Python-引入三方模块问题修复

前提,安装·Python3.X·选用软件默认路径,在终端运行时输入python3与Mac自带的Python2.7以示区别

bogon:~ **$ pip install aiohttp
Collecting aiohttp
  Could not fetch URL https://pypi.python.org/simple/aiohttp/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777) - skipping
  Could not find a version that satisfies the requirement aiohttp (from versions: )
No matching distribution found for aiohttp

输入如下命令即可成功
bogon:~ xx$ pip3 install --trusted-host pypi.python.org aiohttp

解释出自http://blog.csdn.net/tao_627/article/details/69499639或http://stackoverflow.com/questions/16370583/pip-issue-installing-almost-any-library

这样安装成功后,python3环境下import aiohttp报这个错### *python* - *ModuleNotFoundError:* *No* *module* *named* *'aiohttp'*

正确命令如下:

sudo python3 -m pip install --trusted-host pypi.python.org aiohttp

你可能感兴趣的:(Python-引入三方模块问题修复)