AttributeError: 'module' object has no attribute 'packaging'
See original GitHub issue# pip --version
pip 6.1.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
# pip install supervisor --pre
Collecting supervisor
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading supervisor-3.1.3.tar.gz (391kB)
100% |████████████████████████████████| 393kB 950kB/s
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 246, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 342, in run
requirement_set.prepare_files(finder)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 345, in prepare_files
functools.partial(self._prepare_file, finder))
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 290, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 502, in _prepare_file
abstract_dist.prep_for_dist()
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 123, in prep_for_dist
self.req_to_install.run_egg_info()
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 363, in run_egg_info
self.setup_py, self.name,
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 334, in setup_py
import setuptools # noqa
File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 11, in <module>
from setuptools.extension import Extension
File "/usr/local/lib/python2.7/dist-packages/setuptools/extension.py", line 8, in <module>
from .dist import _get_unpatched
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 21, in <module>
packaging = pkg_resources.packaging
AttributeError: 'module' object has no attribute 'packaging'
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:13 (4 by maintainers)
Top Results From Across the Web
AttributeError: 'module' object has no attribute 'version'
I meet the some error, but the error for my situation is in mmcv library. I solve it with
Read more >[setroubleshoot] AttributeError: module 'pkg_resources' has no ...
Description of problem: abrt-cli check found the error what AttributeError: module 'pkg_resources' has no attribute 'get_distribution', ...
Read more >`setup.py install` from VCS checkout fails: AttributeError ...
#3 `setup.py install` from VCS checkout fails: AttributeError: 'module' object has no attribute 'ChangelogAwareDistribution'.
Read more >no module named foo; AttributeError: 'module' object has no ...
I've gone through https://anvil.works/docs/structuring-your-app/how-to-import-things and searched the forums but still just can't work out ...
Read more >SALT AttributeError: 'module' object has no attribute 'dockermod'
SALT AttributeError: 'module' object has no attribute 'dockermod'. This document (000020509) is provided subject to the disclaimer at the end of ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same issue. After upgrading “distribute” from 0.6.24 to 0.7.3, it works. (pip install --upgrade distribute)
geremih commented on May 4
Thanks, this just worked for me as well. Actually that file was from an old distribute installation, which I removed by
I wonder if pip could detect this case.