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.

pip19.0.1 list error"AttributeError: _version"

See original GitHub issue

Environment

  • pip version:19.0.1
  • Python version:3.7
  • OS:MacOS

I update pip from 10.1 to 19.0.1, and I wanna check my python packages, I input “pip list” then two errors occurred. Description

Expected behavior

Exception: Traceback (most recent call last): File “/usr/local/var/pyenv/versions/3.7.0/lib/python3.7/site-packages/pip/_vendor/pkg_resources/init.py”, line 2584, in version return self._version File “/usr/local/var/pyenv/versions/3.7.0/lib/python3.7/site-packages/pip/_vendor/pkg_resources/init.py”, line 2691, in getattr raise AttributeError(attr) AttributeError: _version

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/usr/local/var/pyenv/versions/3.7.0/lib/python3.7/site-packages/pip/_internal/cli/base_command.py”, line 176, in main status = self.run(options, args) File “/usr/local/var/pyenv/versions/3.7.0/lib/python3.7/site-packages/pip/_internal/commands/list.py”, line 148, in run self.output_package_listing(packages, options) File “/usr/local/var/pyenv/versions/3.7.0/lib/python3.7/site-packages/pip/_internal/commands/list.py”, line 205, in output_package_listing data, header = format_for_columns(packages, options) File “/usr/local/var/pyenv/versions/3.7.0/lib/python3.7/site-packages/pip/_internal/commands/list.py”, line 271, in format_for_columns row = [proj.project_name, proj.version] File “/usr/local/var/pyenv/versions/3.7.0/lib/python3.7/site-packages/pip/_vendor/pkg_resources/init.py”, line 2589, in version raise ValueError(tmpl % self.PKG_INFO, self) ValueError: (“Missing ‘Version:’ header and/or METADATA file”, Unknown [unknown version] (/usr/local/var/pyenv/versions/3.7.0/lib/python3.7/site-packages)) How to Reproduce

  1. Get package from ‘…’
  2. Then run ‘…’
  3. An error occurs.

Output

Paste the output of the steps above, including the commands themselves and
pip's output/traceback etc.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:32 (13 by maintainers)

github_iconTop GitHub Comments

6reactions
uluQulucommented, Feb 9, 2019

These don’t look right… ./pocketsphinx-0.1.3.dist-info/pocketsphinx-0.1.3.dist-info/METADATA ./-rpcio-1.18.0.dist-info/grpcio-1.18.0.dist-info/METADATA

@AnonGuy thanks a lot 🙌🏼 -rpcio with a dash was making the problem…

5reactions
pegr69commented, Feb 25, 2019

Same for me a package with a dash was the culprit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attribute Error Installing with pip - python - Stack Overflow
This error is caused by the presence of an outdated version of pkg_resources . In order to get rid of the error, do...
Read more >
Latest version install script errors on installation... - pixls.us
I am getting the followig error when installing the latest RFD via provided ... PkgResourcesDeprecationWarning: 0.1.36ubuntu1 is an invalid version and will ...
Read more >
dictor - PyPI
Version 0.1.10. Dictor is a Python 2 and 3 compatible JSON/Dictionary handler. Dictor takes a dictionary or JSON data and returns value for...
Read more >
Ansible OpenSSL Error with apt module - python - Server Fault
We are using pyOpenSSL and have locked to older version. It's using the latest cryptography library version with requirement cryptography>=2.8 .
Read more >
CHANGELOG — Mock 1.0.1 documentation
Distribution includes unit tests. 2007/11/19 Version 0.1.0¶. Initial release. TODO and Limitations¶. Contributions, bug reports and comments ...
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