11

I am trying to install django-crispy-forms using pipenv.

It installs because when I run "pip freeze" command I see it.

when it is time to Locking [packages] dependencies…

It faces to lock and I get this error.

[pipenv.exceptions.ResolutionFailure]:   File "c:/users/rapture c. 
godson/appdat
a/local/programs/python/python37-32/lib/site- 
packages/pipenv/resolver.py", line
69, in resolve
[pipenv.exceptions.ResolutionFailure]:       req_dir=requirements_dir
[pipenv.exceptions.ResolutionFailure]:   File "c:\users\rapture c. 
godson\appdat
a\local\programs\python\python37-32\lib\site-packages\pipenv\utils.py", 
line 726
, in resolve_deps
[pipenv.exceptions.ResolutionFailure]:       req_dir=req_dir,
[pipenv.exceptions.ResolutionFailure]:   File "c:\users\rapture c. 
godson\appdat
a\local\programs\python\python37-32\lib\site-packages\pipenv\utils.py", 
line 480
, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree = 
resolver.resolve()
[pipenv.exceptions.ResolutionFailure]:   File "c:\users\rapture c. 
godson\appdat
a\local\programs\python\python37-32\lib\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 install
[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 install
No versions found
Was https://pypi.org/simple reachable?

I have tried running the following commands suggest[pipenv install --skip-lock and pipenv install --skip-lock] but I still get the same error.

how can this be fixed because I want to deploy the project on Heroku and I don't know if this will prevents the project from deploying?

4 Answers4

11

Try to remove from pipfile the library that gives you the problem, check if you have a typo.

pipenv install "any-library" will insert "any-library" to the pipfile even if it does not exist, that could be one reason for the error,

example: $ pipenv install any-library

ERROR: ERROR: Could not find a version that matches any-library

kae_screechae
  • 169
  • 12
ENcy
  • 324
  • 4
  • 7
1

I just had the same error but it happed due to a different reason. Even if you don't have any typos in your required Python packages, you get the exact same error with "No versions found" if you forget to declare a specific Python version like "python_requires='>=3.8'"

CheradenineZK
  • 149
  • 1
  • 6
0

It might help to update your pip inside your virtualenv: py -m pip install --upgrade pip

Wesley Cheek
  • 1,058
  • 12
  • 22
0

Probably there is something wrong with your Pipfile .

First run pipenv lock --clear and then check Pipfile.

One of problem in Pipfile is you have a package (name of a package) that doesn't exit in Pipfile.lock, so you should delete it from Pipfile

(Pipfile and Pipfile.lock must be sync)

In Mycase I've had (in Pipfile) django = "==3.2" and change it to django = "*" and error was fixed.