Pipenv: ERROR: ERROR: Could not find a version that matches requirements-txt

Created on 17 Apr 2019  Ā·  6Comments  Ā·  Source: pypa/pipenv

$ pipenv --support

Pipenv version: '2018.11.26'

Pipenv location: '/Users/ghalyahalansari/anaconda3/lib/python3.7/site-packages/pipenv'

Python location: '/Users/ghalyahalansari/anaconda3/bin/python'

Python installations found:

  • 3.7.1: /Users/ghalyahalansari/anaconda3/bin/python3
  • 3.7.0: /Users/ghalyahalansari/anaconda3/bin/pythonw
  • 3.7.0: /usr/local/bin/python3
  • 3.7.0: /usr/local/bin/python3.7m
  • 3.5.5: //anaconda/bin/python3
  • 3.5.4: //anaconda/bin/pythonw
  • 2.7.15: /usr/local/bin/python
  • 2.7.15: /usr/local/bin/pythonw
  • 2.7.10: /usr/bin/python
  • 2.7.10: /usr/bin/pythonw
  • 2.7.10: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.1',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '18.2.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST '
                     '2018; root:xnu-4903.241.1~1/RELEASE_X86_64',
 'python_full_version': '3.7.1',
 'python_version': '3.7',
 'sys_platform': 'darwin'}

System environment variables:

  • TERM_SESSION_ID
  • SSH_AUTH_SOCK
  • Apple_PubSub_Socket_Render
  • COLORFGBG
  • ITERM_PROFILE
  • XPC_FLAGS
  • LANG
  • PWD
  • SHELL
  • TERM_PROGRAM_VERSION
  • TERM_PROGRAM
  • PATH
  • COLORTERM
  • TERM
  • HOME
  • TMPDIR
  • USER
  • XPC_SERVICE_NAME
  • LOGNAME
  • __CF_USER_TEXT_ENCODING
  • ITERM_SESSION_ID
  • SHLVL
  • OLDPWD
  • ZSH
  • PAGER
  • LESS
  • LSCOLORS
  • LC_CTYPE
  • CONDA_SHLVL
  • CONDA_DEFAULT_ENV
  • CONDA_EXE
  • CONDA_PREFIX
  • CONDA_PROMPT_MODIFIER
  • CONDA_PYTHON_EXE
  • _
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenvā€“specific environment variables:

Debugā€“specific environment variables:

  • PATH: /Users/ghalyahalansari/anaconda3/bin:/anaconda3/bin://anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
  • SHELL: /bin/zsh
  • LANG: en_US.UTF-8
  • PWD: /Users/ghalyahalansari/Development/env11/task_11

Contents of Pipfile ('/Users/ghalyahalansari/Development/env11/task_11/Pipfile'):

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

[dev-packages]

[packages]
certifi = "==2018.4.16"
chardet = "==3.0.4"
defusedxml = "==0.5.0"
django-allauth = "==0.36.0"
django-crispy-forms = "==1.7.2"
idna = "==2.7"
oauthlib = "==2.1.0"
python3-openid = "==3.1.0"
pytz = "==2018.3"
requests = "==2.19.1"
requests-oauthlib = "==1.0.0"
urllib3 = "==1.23"
Django = "==2.0.4"
Pillow = "==6.0.0"
requirements-txt = "*"

[requires]
python_version = "3.7"

Most helpful comment

So i had typed pipenv install requirements.txt instead of pipenv install -r requirements.txt which installed requirements-txt and that does not exist.
I simply forgot the -r Flag.

SOLUTION:
To fix this i removed the environment.

pipenv --rm
Yes it is "--rm" not "-rm"

and deleted the Pipfile and Pipfile.lock from my Workspace.
There should be no "requirements-txt = "*"" in your requirements.txt file.

pipenv shell

Hope this helps anyone ;)

All 6 comments

I tried pipenv lock --clear and $ pipenv install --skip-lock, but it still won't work.

@GhalyahF Where does the package requirements-txt locate? I couldn't find it on PyPI and neither could Pipenv.

@frostming Yes, it's not finding it - that's the issue . It's in the project folder.

I have a similar issue when attempting to install num2word. I receive the error message both on install and uninstall, but graph shows num2words as being installed. pipenv lock --clear does not fix this.

pipenv graph

fuzzywuzzy==0.17.0
humanize==0.5.1
num2words==0.5.10
  - docopt [required: >=0.6.2, installed: 0.6.2]
pandas==0.24.2
  - numpy [required: >=1.12.0, installed: 1.16.3]
  - python-dateutil [required: >=2.5.0, installed: 2.8.0]
    - six [required: >=1.5, installed: 1.12.0]
  - pytz [required: >=2011k, installed: 2019.1]
PyMySQL==0.9.3
python-Levenshtein==0.12.0
  - setuptools [required: Any, installed: 41.0.1]
SQLAlchemy==1.3.3

pipenv uninstall num2words

Uninstalling num2wordsā€¦
No package num2words to remove from Pipfile.
Locking [dev-packages] dependenciesā€¦
Locking [packages] dependenciesā€¦
āœ˜ Locking Failed! 
[pipenv.exceptions.ResolutionFailure]:   File "/Users/user/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pipenv/resolver.py", line 69, in resolve
[pipenv.exceptions.ResolutionFailure]:       req_dir=requirements_dir
[pipenv.exceptions.ResolutionFailure]:   File "/Users/user/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pipenv/utils.py", line 726, in resolve_deps
[pipenv.exceptions.ResolutionFailure]:       req_dir=req_dir,
[pipenv.exceptions.ResolutionFailure]:   File "/Users/user/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree = resolver.resolve()
[pipenv.exceptions.ResolutionFailure]:   File "/Users/user/.pyenv/versions/3.6.8/lib/python3.6/site-packages/pipenv/utils.py", line 395, in resolve
[pipenv.exceptions.ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]:       pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches num2word
[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 num2word
No versions found

I had installed Python 3.7.4 using pyenv and I don't fully understand the reason but my Pipfile had this line in package list

[packages]
3-7-4 = "*"

Removing the 3-7-4 line fixed the issue for me.

So i had typed pipenv install requirements.txt instead of pipenv install -r requirements.txt which installed requirements-txt and that does not exist.
I simply forgot the -r Flag.

SOLUTION:
To fix this i removed the environment.

pipenv --rm
Yes it is "--rm" not "-rm"

and deleted the Pipfile and Pipfile.lock from my Workspace.
There should be no "requirements-txt = "*"" in your requirements.txt file.

pipenv shell

Hope this helps anyone ;)

Was this page helpful?
0 / 5 - 0 ratings