解决问题:No module named extern.six.moves

C:\Users\Qin>pip install setuptools
Collecting setuptools
  Downloading http://mirrors.aliyun.com/pypi/packages/3b/7e/293d19ccd106119e35db4bf3e111b1895098f618b455b758aa636496cf03/setuptools-28.8.0-py2.py3-none-any.whl (472kB)
    100% |████████████████████████████████| 481kB 6.4MB/s
Installing collected packages: setuptools
Successfully installed setuptools-28.8.0

C:\Users\Qin>pip install requests[socks]
Requirement already satisfied: requests[socks] in e:\python\lib\site-packages
Collecting PySocks!=1.5.7,>=1.5.6; extra == "socks" (from requests[socks])
  Downloading http://mirrors.aliyun.com/pypi/packages/03/a5/957346ba692216cc00e8146fb1a5da0854f8320d7eb073b1cfcb7ad977b5/PySocks-1.5.6.tar.gz
Could not import setuptools which is required to install from a source distribution.
Traceback (most recent call last):
  File "e:\python\lib\site-packages\pip\req\req_install.py", line 387, in setup_py
    import setuptools  # noqa
  File "e:\python\lib\site-packages\setuptools\__init__.py", line 10, in <module>
    from setuptools.extern.six.moves import filter, filterfalse, map
  File "e:\python\lib\site-packages\setuptools\setuptools\__init__.py", line 11, in <module>
    from setuptools.extension import Extension
  File "e:\python\lib\site-packages\setuptools\extension.py", line 7, in <module>
    from setuptools.extern.six.moves import map
ImportError: No module named extern.six.moves

参照网上试过

pip install -U setuptools

也试过用命令重装setuptools。问题依旧。

最终前往X:\python\lib\site-packages,将两个setuptools相关文件夹和一个six-1.10.0删除后,重新安装setuptools,然后安装pip install requests[socks],就一切正常了!

转载于:https://my.oschina.net/furawa/blog/794291

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值