pip install error: cannot import name 'unpack_

2019-02-12 22:20发布

I'm using Python 3.4.1 64-bit on a Windows 8.1 machine. Pip has been giving me problems lately, specifically this error:

C:\Users\Charlie\Desktop>pip install wxPython_Phoenix-3.0.3.dev78341-cp34-none-w
in_amd64.whl
Traceback (most recent call last):
  File "C:\Python34\Scripts\pip-script.py", line 9, in <module>
    load_entry_point('Scipy-stack==14.8.27', 'console_scripts', 'pip')()
  File "C:\Python34\lib\site-packages\pkg_resources\__init__.py", line 519, in l
oad_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "C:\Python34\lib\site-packages\pkg_resources\__init__.py", line 2630, in
load_entry_point
    return ep.load()
  File "C:\Python34\lib\site-packages\pkg_resources\__init__.py", line 2310, in
load
    return self.resolve()
  File "C:\Python34\lib\site-packages\pkg_resources\__init__.py", line 2316, in
resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "C:\Python34\lib\site-packages\pip\__init__.py", line 13, in <module>
    from pip.commands import commands, get_summaries, get_similar_commands
  File "C:\Python34\lib\site-packages\pip\commands\__init__.py", line 6, in <mod
ule>
    from pip.commands.bundle import BundleCommand
  File "C:\Python34\lib\site-packages\pip\commands\bundle.py", line 6, in <modul
e>
    from pip.commands.install import InstallCommand
  File "C:\Python34\lib\site-packages\pip\commands\install.py", line 5, in <modu
le>
    from pip.req import InstallRequirement, RequirementSet, parse_requirements
  File "C:\Python34\lib\site-packages\pip\req\__init__.py", line 4, in <module>
    from .req_set import RequirementSet, Requirements
  File "C:\Python34\lib\site-packages\pip\req\req_set.py", line 9, in <module>
    from pip.download import (url_to_path, unpack_url)
ImportError: cannot import name 'unpack_url'

This occurs every time I try to install any package. Has anyone had this problem before?

2条回答
Rolldiameter
2楼-- · 2019-02-12 22:50

Well, obviously there is an error with pip and unpack_url is probably use to download packages from PyPi. I suggest reinstalling by executing this script.

查看更多
看我几分像从前
3楼-- · 2019-02-12 22:59

I used: easy_install -U pip problem solved

查看更多
登录 后发表回答