How to deal with DistributionNotFound errors

problem

It didn't work properly because the version of pip is old.

environment

OSX 10.9.2

Trouble

command

$ python --version

Execution result

Traceback (most recent call last):
  File "/usr/local/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/Library/Python/2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 2877, in <module>
    working_set.require(__requires__)
  File "/Library/Python/2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 698, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Library/Python/2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 596, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==1.4.1

How to respond

It was solved by upgrading pip.

command

$ sudo easy_install --upgrade pip

Execution result

Reading http://pypi.python.org/simple/pip/
Best match: pip 1.5.4
Downloading https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb
Processing pip-1.5.4.tar.gz
Writing /tmp/easy_install-w8dJ21/pip-1.5.4/setup.cfg
Running pip-1.5.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-w8dJ21/pip-1.5.4/egg-dist-tmp-61WflU
warning: no files found matching 'pip/cacert.pem'
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.rst' found under directory 'docs/_build'
no previously-included directories found matching 'docs/_build/_sources'
Adding pip 1.5.4 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip2.7 script to /usr/local/bin
Installing pip2 script to /usr/local/bin

Installed /Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip

Verification

I confirmed that it started to work normally.

command

$ python --version

Execution result

pip 1.5.4 from /Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg (python 2.7)

Recommended Posts

How to deal with DistributionNotFound errors
How to deal with enum compatibility errors
[Python] How to deal with module errors
How to deal with errors when hitting pip ②
How to deal with imbalanced data
How to deal with imbalanced data
For beginners, how to deal with common errors in keras
How to deal with errors when installing whitenoise and deploying to Heroku
How to deal with errors when installing Python and pip with choco
How to deal with memory leaks in matplotlib.pyplot
can't pickle annoy. How to deal with Annoy objects
How to deal with module'tensorflow' has no attribute'〇〇'
How to deal with SessionNotCreatedException when using Selenium
How to update with SQLAlchemy?
How to cast with Theano
How to Alter with SQLAlchemy?
How to separate strings with','
How to RDP with Fedora31
2 ways to deal with SessionNotCreatedException
How to Delete with SQLAlchemy?
How to deal with Django's Template Does Not Exist
How to deal with pyenv initialization failure in fish 3.1.0
[Python] How to deal with pandas read_html read error
How to deal with Executing transaction: failed in Anaconda
[EC2] How to deal with errors that selenium cannot execute (No module named selenium)
How to cancel RT with tweepy
Python: How to use async with
How to use virtualenv with PowerShell
How to install python-pip with ubuntu20.04LTS
How to get started with Scrapy
How to get started with Python
How to get started with Django
How to Data Augmentation with PyTorch
[AWS] How to deal with "Invalid codepoint" error in CloudSearch
A story about how to deal with the CORS problem
How to use FTP with Python
How to calculate date with python
How to install mysql-connector with pip3
How to INNER JOIN with SQLAlchemy
How to deal with UnicodeDecodeError when executing google image download
How to install Anaconda with pyenv
How to authenticate with Django Part 2
How to authenticate with Django Part 3
How to deal with python installation error in pyenv (BUILD FAILED)
How to deal with "You have multiple authentication backends configured ..." (Django)
How to install pandas on EC2 (How to deal with MemoryError and PermissionError)
How to do arithmetic with Django template
[Blender] How to set shape_key with script
How to title multiple figures with matplotlib
How to add a package with PyCharm
How to install DLIB with 2020 / CUDA enabled
How to use ManyToManyField with Django's Admin
How to use OpenVPN with Ubuntu 18.04.3 LTS
How to prevent package updates with apt
How to use Ass / Alembic with HtoA
How to use Japanese with NLTK plot
How to do portmanteau test with python
How to search Google Drive with Google Colaboratory
How to display python Japanese with lolipop
How to download youtube videos with youtube-dl
How to use jupyter notebook with ABCI