question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip3 install -U pip check version raise ValueError Exception

See original GitHub issue

Environment

  • pip version: 18.1
  • Python version: 3.6.8
  • OS: Mac OS

Description

 pip3 install -U pip
Looking in indexes: https://mirrors.ustc.edu.cn/pypi/web/simple
Collecting pip
  Downloading https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/60/64/73b729587b6b0d13e690a7c3acd2231ee561e8dd28a58ae1b0409a5a2b20/pip-19.0-py2.py3-none-any.whl (1.4MB)
    100% |████████████████████████████████| 1.4MB 4.2MB/s 
Exception:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip-18.1-py3.6.egg/pip/_vendor/pkg_resources/__init__.py", line 2570, in version
    return self._version
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip-18.1-py3.6.egg/pip/_vendor/pkg_resources/__init__.py", line 2677, in __getattr__
    raise AttributeError(attr)
AttributeError: _version

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip-18.1-py3.6.egg/pip/_internal/cli/base_command.py", line 143, in main
    status = self.run(options, args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip-18.1-py3.6.egg/pip/_internal/commands/install.py", line 349, in run
    self._warn_about_conflicts(to_install)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip-18.1-py3.6.egg/pip/_internal/commands/install.py", line 475, in _warn_about_conflicts
    package_set, _dep_info = check_install_conflicts(to_install)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip-18.1-py3.6.egg/pip/_internal/operations/check.py", line 98, in check_install_conflicts
    package_set = create_package_set_from_installed()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip-18.1-py3.6.egg/pip/_internal/operations/check.py", line 41, in create_package_set_from_installed
    package_set[name] = PackageDetails(dist.version, dist.requires())
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip-18.1-py3.6.egg/pip/_vendor/pkg_resources/__init__.py", line 2575, in version
    raise ValueError(tmpl % self.PKG_INFO, self)
ValueError: ("Missing 'Version:' header and/or METADATA file", Unknown [unknown version] (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages))

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
Manchangdxcommented, Jan 26, 2019

我也遇到了相同的问题,鼓捣了两小时未果。

1reaction
miozuscommented, Jan 31, 2019

I have met this solution for sad 3 days but solved by reinstalling:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

python get-pip.py

Collecting pip Using cached https://files.pythonhosted.org/packages/46/dc/7fd5df840efb3e56c8b4f768793a237ec4ee59891959d6a215d63f727023/pip-19.0.1-py2.py3-none-any.whl Collecting wheel Using cached https://files.pythonhosted.org/packages/ff/47/1dfa4795e24fd6f93d5d58602dd716c3f101cfd5a77cd9acbe519b44a0a9/wheel-0.32.3-py2.py3-none-any.whl Installing collected packages: pip, wheel Found existing installation: pip 18.1 Uninstalling pip-18.1: Successfully uninstalled pip-18.1 Successfully installed pip-19.0.1 wheel-0.32.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pip list raises ValueError - python - Stack Overflow
I'm working on a fresh virtual machines where these commands have been run, with the final command installing something I had cloned from...
Read more >
Using Python's pip to Manage Your Projects' Dependencies
What is pip? In this beginner-friendly tutorial, you'll learn how to use pip, the standard package manager for Python, so that you can ......
Read more >
ARTIFACTORY: pip install doesn't work with pip 22.x - JFrog
ARTIFACTORY: pip install doesn't work with pip 22.x · Why do I get an error when trying to download PyPI packages after I...
Read more >
Command python setup py egg info failed with error code 1 in ...
Hi Guys,. I am trying to install tensorflow in my docker. But it shows me the below error.
Read more >
urllib3 - PyPI
python -m pip install urllib3. Alternatively, you can grab the latest source code from GitHub: $ git clone https://github.com/urllib3/urllib3.git $ cd ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found