[PYTHON] What to do if you get a "No versions found" error in pipenv

Event: Error installing package using pipenv

I tried to install using pipenv as follows

pipenv install <package name>

I got angry as follows.

[pipenv.exceptions.ResolutionFailure]:       pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches request
[pipenv.exceptions.ResolutionFailure]:       No versions found
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: ERROR: Could not find a version that matches request
No versions found
Was https://pypi.org/simple reachable?

Cause

It seems that the cause is that the SSL authentication of pip used by pipenv is not successful. Even when I was doing `` `pip install``` normally

ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)

I was angry, so as a provisional measure

pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host <package name>

It was cloudy as tea, but it seems that pipenv can not add the above option

approach

This can be solved by making the necessary settings in the pip configuration file `` `pip.conf```. For Mac

mkdir ~/.pip
vim ~/.pip/pip.conf

As

pip.conf


[global]
trusted-host = pypi.python.org
               pypi.org
               files.pythonhosted.org

You just have to make. For other environments, see https://qiita.com/agajo/items/73d6f14855da703972e0 for reference.

Recommended Posts

What to do if you get a "No versions found" error in pipenv
What to do if you get a minus zero in Python
What to do if you get `No kernel for language python found` in Hydrogen
What to do if you get Swagger-codegen in python and Import Error: No module named
What to do if you get a Cannot retrieve metalink for repository error in yum
What to do if you get a must override `get_config` error when trying to model.save in Keras
What to do if you get "coverage unknown" in Coveralls
What to do if a 0xC0000005 error occurs in tf.train.start_queue_runners ()
What to do if you get a memory error when converting from PySparkDataFrame to PandasDataFrame
What to do if you get "(35,'SSL connect error')" in pycurl (one of them)
What to do if you get an error when importing matplotlib in Python (Mac)
What to do if you get a UnicodeDecodeError with pip install
What to do if you get an error when trying to send a message in tasks.loop () immediately after startup
What to do if you can't pipenv shell
What to do if you get an error when running "certbot renew" in CakePHP environment
What to do if you get a Call with too many input arguments error at DoAndReturn in a golang test
What to do if you get lost in file reference with FileNotFoundError
What to do if you get angry in TensorFlow v2 without attribute'app'
What to do if No Python documentation found for ... appears in pydoc
What to do if you get a TypeError with numpy min, max
What to do if you get an error when trying to load mnist
What to do if you get an error when installing Dlib (Ubuntu)
If you get a no attribute error in boto3, check the version
What to do if you get angry with'vertices' must be a 2D list ... in matplotlib arrow
What to do if you get an error saying c compiler cannot create executables in configure
No module named What to do if you get'libs.resources'
ModuleNotFoundError: No module What to do if you get'tensorflow.contrib'
What to do if a UnicodeDecodeError occurs in pip
What to do if a Unicode Encode Error occurs in Sublime Text Python
What to do if you get an error when installing python with pyenv
What to do if you get "Python not configured." Using PyDev in Eclipse
[Python] What to check when you get a Unicode Decode Error in Django
What to do if a version error occurs in the selenium Chrome driver
What to do if you get angry with "Value Error: unknown local: UTF-8" in python manage.py syncdb
What to do if you get a Permission denied (public key) error when trying to pull on Github
[Python] What to do if you get a ModuleNotFoundError when importing pandas using Jupyter Notebook in Anaconda
What to do if pip gives a DistributionError in Homebrew
What to do if you can't log in as root
What to do if you get an "unknown service" error from your gRPC server
What to do if you get an OpenSSL error when installing Python 2 with pyenv
What to do if you get an Import Error when importing matplotlib with Jupyter
What to do if you get the error ʻERR_FEATURE_UNAVAILABLE_ON_PLATFORM` when using ts-node-dev on Linux
What to do if you run python in IntelliJ and end with an error
What to do if you get the error Input contains NaN, infinity or a value too large for dtype ('float64'). In machine learning
What to do if you get the error RuntimeError: Python is not installed as a framework when trying to use matplitlib and pylab in Python 3.3
What to do if you can't use the trash in Lubuntu 18.04.
What to do if you get an Undefined error:'Module_six_moves_urllib_parse' object has no attribute'urlencode' on MacOS
What to do if you get an Undefined error when trying to use pip with pyenv
What to do if pip --user returns an error in a virtual environment created with pyenv
What to do if there is a decimal in python json .dumps
What to do if you can't find PDO in Laravel or CakePHP
If you get a Programming Error: (1146, "Table'<table name>' doesn't exist") in Django
What to do if you can't use scikit grid search in Python
What to do if you get stuck during Anaconda installation on Linux
What to do if you can't install with pip in babun environment
What to do if you get Could not fetch URL 443 with pip
What happens if you do "import A, B as C" in Python?
What to do if pipreqs results in UnicodeDecodeError
What to do to get google spreadsheet in python
What to do if "amazon-linux-extras" → "No module named amazon_linux_extras"
EC2 / Amazon Linux2: What to do if you get an "unable to execute'gcc': No such file or directory" error with pip install