pipenv: ERROR: Could not find a version that matches requests

I ran:

$ mkdir test
$ cd test
$ pipenv install requests

but this caused the following error:

ERROR: ERROR: Could not find a version that matches requests
No versions found
Was https://pypi.org/simple reachable?

I thought this problem is due to proxy, but the following successfully run.

$ pip install requests

Please help me…


$ pipenv --support

Pipenv version: '2018.11.26'

Pipenv location: '/home/tamura/.local/lib/python3.5/site-packages/pipenv'

Python location: '/usr/bin/python3'

Python installations found:

  • 3.5.2: /usr/bin/python3
  • 2.7.12: /usr/bin/python2.7
  • 3.6.8: /home/tamura/my_path/anaconda3/envs/smiles/bin/python
  • 3.7.2: /home/tamura/my_path/anaconda3/bin/python3.7m
  • 3.5.2: /usr/bin/python3.5m

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.5.2',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.4.0-21-generic',
 'platform_system': 'Linux',
 'platform_version': '#37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016',
 'python_full_version': '3.5.2',
 'python_version': '3.5',
 'sys_platform': 'linux'}

System environment variables:

  • https_proxy
  • SHLVL
  • BYOBU_ULIMIT
  • no_proxy
  • PYTHONDONTWRITEBYTECODE
  • SHELL_TYPE
  • IGNOREEOF
  • HOME
  • TERM
  • UNZIP
  • SUPPRESS_BRANCH_TIMEOUT_MESSAGE
  • UPDATE_COMPLETIONS_ON_KEYPRESS
  • LANG
  • BYOBU_TIME
  • LS_COLORS
  • BYOBU_LIGHT
  • UPDATE_PROMPT_ON_KEYPRESS
  • XONSH_AUTOPAIR
  • GTK_IM_MODULE
  • BYOBU_SED
  • QT_IM_MODULE
  • XONSH_LOGIN
  • BYOBU_READLINK
  • LESSOPEN
  • BYOBU_DISTRO
  • BYOBU_CHARMAP
  • BYOBU_PYTHON
  • _
  • PATH
  • SSH_CLIENT
  • http_proxy
  • BASH_COMPLETIONS
  • BYOBU_WINDOW_NAME
  • RIGHT_PROMPT
  • ZIPINFO
  • INDENT
  • TMUX_PANE
  • CONDA_PREFIX
  • GTK_MODULES
  • BYOBU_RUN_DIR
  • TMUX
  • SHELL
  • BYOBU_ACCENT
  • XONSHRC
  • _DEFAULT_CONDA_PATH
  • BYOBU_CONFIG_DIR
  • LOADED_RC_FILES
  • PYTHONFINDER_IGNORE_UNSUPPORTED
  • NVM_DIR
  • XDG_RUNTIME_DIR
  • BOTTOM_TOOLBAR
  • LOGNAME
  • PIP_PYTHON_PATH
  • CONDA_DEFAULT_ENV
  • VI_MODE
  • NVM_CD_FLAGS
  • PIP_SHIMS_BASE_MODULE
  • NVM_BIN
  • VISUAL
  • JUPYTER_PATH
  • PIP_DISABLE_PIP_VERSION_CHECK
  • BYOBU_DATE
  • BYOBU_DARK
  • XDG_SESSION_ID
  • BYOBU_PAGER
  • QT_QPA_PLATFORMTHEME
  • XONSH_INTERACTIVE
  • SSH_CONNECTION
  • OLDPWD
  • PWD
  • USER
  • PYTHONPATH
  • BYOBU_BACKEND
  • MAIL
  • BYOBU_PREFIX
  • XONSH_VERSION
  • XMODIFIERS
  • XONSH_SHOW_TRACEBACK
  • XDG_DATA_DIRS
  • SSH_TTY
  • BYOBU_TTY
  • AUTO_CD
  • LESSCLOSE
  • CONDA_SHLVL
  • BYOBU_HIGHLIGHT
  • CASE_SENSITIVE_COMPLETIONS
  • DISPLAY
  • CONDA_EXE

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /home/tamura/my_path/anaconda3/envs/smiles/bin:/home/tamura/.nvm/versions/node/v11.9.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/tamura/my_path/bin/:/usr/local/cuda/lib64/:/usr/local/cuda/bin/:/home/tamura/my_path/anaconda3/envs/main/bin/:/home/tamura/my_path/bin/:/usr/local/cuda/lib64/:/usr/local/cuda/bin/:/home/tamura/.local/bin:/home/tamura/my_path/anaconda3/bin
  • SHELL: /bin/bash
  • LANG: ja_JP.UTF-8
  • PWD: /home/tamura/work/test

Contents of Pipfile (‘/home/tamura/work/test/Pipfile’):

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
requests = "*"

[requires]
python_version = "3.7"

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 17 (4 by maintainers)

Most upvoted comments

These steps solved similar issue I had recently:

Delete the virtual environment and pipfile(s)

$ pipenv --rm 
$ rm Pipfile
$ rm Pipfile.lock 

then reinstall project dependencies $ pipenv install package1 package2 package3

Why is this issue closed? This is still an issue on Windows. Are there any fixes for WINDOWS machines? Thanks.

I had a similar issue when I tried to create a new project. The workaround I found was to write the Pipfile myself:

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]
requests = "*"

This issue occured for me when I installed a brew package that installed a new version of python on my machine (3.8 vs 3.7.x which I was using)

When it did this it broke the OpenSSL installation that pip was using. This was the reason that it could not find any versions on pip.

I ended up having to reinstall python with:

brew reinstall python

This StackOverflow answer helps give more details on this for others:

https://stackoverflow.com/a/59280089/1327815