question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pipenv not creating pip.lock file

See original GitHub issue

pipenv supposed to create pipfile and pip.lock file. But when I install a dependency. Pip.lock file isn’t creating. and I get this error message

Locking Failed! [pipenv.exceptions.ResolutionFailure]: File "c:/users/ema/appdata/local/programs/python/python37/lib/site-packages/pipenv/resolver.py", line 69, in resolve [pipenv.exceptions.ResolutionFailure]: req_dir=requirements_dir [pipenv.exceptions.ResolutionFailure]: File "c:\users\ema\appdata\local\programs\python\python37\lib\site-packages\pipenv\utils.py", line 726, in resolve_deps [pipenv.exceptions.ResolutionFailure]: req_dir=req_dir, [pipenv.exceptions.ResolutionFailure]: File "c:\users\ema\appdata\local\programs\python\python37\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\ema\appdata\local\programs\python\python37\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 aniso8601<8.0.0,<=6.0.*,>=3,>=7.0.0 [pipenv.exceptions.ResolutionFailure]: Tried: 0.48, 0.49, 0.50, 0.60, 0.70, 0.80, 0.81, 0.82, 0.83, 0.84, 0.85, 0.90, 0.91, 0.92, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 2.0.0, 2.0.1, 2.0.1, 3.0.0, 3.0.0, 3.0.2, 3.0.2, 4.0.0, 4.0.0, 4.0.1, 4.0.1, 4.1.0, 4.1.0, 5.0.0, 5.0.0, 5.0.1, 5.0.1, 5.1.0, 5.1.0, 6.0.0, 6.0.0, 7.0.0, 7.0.0 [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 aniso8601<8.0.0,<=6.0.*,>=3,>=7.0.0 Tried: 0.48, 0.49, 0.50, 0.60, 0.70, 0.80, 0.81, 0.82, 0.83, 0.84, 0.85, 0.90, 0.91, 0.92, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 2.0.0, 2.0.1, 2.0.1, 3.0.0, 3.0.0, 3.0.2, 3.0.2, 4.0.0, 4.0.0, 4.0.1, 4.0.1, 4.1.0, 4.1.0, 5.0.0, 5.0.0, 5.0.1, 5.0.1, 5.1.0, 5.1.0, 6.0.0, 6.0.0, 7.0.0, 7.0.0 There are incompatible versions in the resolved dependencies. [pipenv.exceptions.ResolutionFailure]: req_dir=requirements_dir [pipenv.exceptions.ResolutionFailure]: File "c:\users\ema\appdata\local\programs\python\python37\lib\site-packages\pipenv\utils.py", line 726, in resolve_deps [pipenv.exceptions.ResolutionFailure]: req_dir=req_dir, [pipenv.exceptions.ResolutionFailure]: File "c:\users\ema\appdata\local\programs\python\python37\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\ema\appdata\local\programs\python\python37\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 aniso8601<8.0.0,<=6.0.*,>=3,>=7.0.0 [pipenv.exceptions.ResolutionFailure]: Tried: 0.48, 0.49, 0.50, 0.60, 0.70, 0.80, 0.81, 0.82, 0.83, 0.84, 0.85, 0.90, 0.91, 0.92, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 2.0.0, 2.0.1, 2.0.1, 3.0.0, 3.0.0, 3.0.2, 3.0.2, 4.0.0, 4.0.0, 4.0.1, 4.0.1, 4.1.0, 4.1.0, 5.0.0, 5.0.0, 5.0.1, 5.0.1, 5.1.0, 5.1.0, 6.0.0, 6.0.0, 7.0.0, 7.0.0 [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 aniso8601<8.0.0,<=6.0.*,>=3,>=7.0.0 Tried: 0.48, 0.49, 0.50, 0.60, 0.70, 0.80, 0.81, 0.82, 0.83, 0.84, 0.85, 0.90, 0.91, 0.92, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 2.0.0, 2.0.1, 2.0.1, 3.0.0, 3.0.0, 3.0.2, 3.0.2, 4.0.0, 4.0.0, 4.0.1, 4.0.1, 4.1.0, 4.1.0, 5.0.0, 5.0.0, 5.0.1, 5.0.1, 5.1.0, 5.1.0, 6.0.0, 6.0.0, 7.0.0, 7.0.0 There are incompatible versions in the resolved dependencies.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

1reaction
Kitefikocommented, Jun 14, 2019

@iNightElf I don’t think, that would help. You would have to get aniso8601 to version 4.* (that one doesn’t require relativetimebuilder), but you wont be simply able to do that.

What could help you (kinda) at least continue development:

  • add this packages to Pipfile (aniso version that you need) aniso8601 = "==5.1.0" relativetimebuilder = "<2.0.0"
  • install with skipping lock pipenv install --skip-lock

You will get some errors, but all packages will be installed hopefully. Works for me. Of course no locking.

Hope this will help.

1reaction
ftobiacommented, Jun 13, 2019

Thank you @Kitefiko , I have run into exactly this problem and you saved me some debugging. Based on your diagnosis, I have a workaround: add this line to your Pipfile: relativetimebuilder = "<2.0.0" For my particular set of packages, at least, this allowed a Pipfile.lock to be built.

It seems like the larger issue is that, even though a set of packages existed to satisfy the dependencies given in a Pipfile, Pipenv’s dependency resolution algorithm backed itself into a corner. I’m guessing that fixing that is a hard problem (apparently dependency resolution in general is an NP-hard problem https://stackoverflow.com/questions/28099683/algorithm-for-dependency-resolution).

Do any of the Pipenv maintainers have some pointers about how to go about taking a crack at this, if one were so inclined?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pipenv not creating Pipfile and not creating environment in ...
I fixed the problem by simply deleting the Pipfile and Pipfile.lock files that were in C:\Users\my_user , and then in my ...
Read more >
pipenv install does not create two new files, Pipfile ... - GitHub
I ran pipenv install into existing django 1.11 project, but it does not create two new files, Pipfile and Pipfile.lock, in project directory ......
Read more >
Common Pipenv Errors and How to Solve Them: Why Won't it ...
Pipfile won't lock when it tries to install packages that don't exist, i.e., typos. ... Pipenv looks for the package you specify, whether...
Read more >
Basic Usage of Pipenv - Read the Docs
Example Pipfile & Pipfile.lock¶. Pipfiles contain information for the dependencies of the project, and supersedes the requirements.txt file used in most ...
Read more >
pipenv Documentation - Read the Docs
Pipenv uses two files to do this: Pipfile and Pipfile.lock (which will look ... Will create a virtual env and install dependencies (if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found