pipenv not creating pip.lock file

Created on 12 Jun 2019  路  10Comments  路  Source: pypa/pipenv

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! 5.1.0, 6.0.0, 6.0.0, 7.0.0, 7.0.0 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. 5.1.0, 6.0.0, 6.0.0, 7.0.0, 7.0.0 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.

All 10 comments

Hey,
i seem to have the same issue.
After investigating i came to conclusion what is happening.

In my case it goes like this:

  • graphene(2.1.5) requires aniso8601<=6.0.*,>=3
  • pipenv finds candidate aniso8601==5.1.0 (constraint was >=3,<=6.0.*)
  • aniso8601==5.1.0 requires relativetimebuilder>=0.2.0
  • pipenv finds candidate relativetimebuilder==2.0.0 (constraint was >=0.2.0)
    Now comes the fun part.
  • relativetimebuilder==2.0.0 requires aniso8601<8.0.0,>=7.0.0, python-dateutil>=2.7.3
  • constraints for aniso8601 are <8.0.0,<=6.0.*,>=3,>=7.0.0

The newest constraints for aniso are unsolvable = NoCandidateFound exception.

11 June relativetimebuilder has been updated to 2.0.0 what is probably cause of the problem.

I can provide entire log from "pipenv install -d --verbose" if that would help.

I did not find solution for this, please help 馃啒

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?

@ftobia

add this line to your Pipfile: relativetimebuilder = "<2.0.0"

That was first thing that i actually tried, "=1.0.0" isn't working either. 馃槥
Any package, that has dependency on aniso8601 or aniso8601 package itself with version < 7.0.0 will trigger this error.

@Kitefiko

So if I downgrade everything, Will it fix the problem?

@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.

@Kitefiko

Wow this actually solves my problem

  • When I add these two packages in pipfile
    aniso8601 = "==5.1.0"
    relativetimebuilder = "<2.0.0"

Then just do the normal
pipenv install

It's creating pip.lock file and after that, I can just install any package without any problem

@iNightElf
Glad it help. But doesn't do it for me.
Could you possibly provide your PipFile, so i can further investigate?

@Kitefiko
Sure why not?
These are the codes

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

[dev-packages]
pylint = "*"

[packages]
aniso8601 = "==5.1.0"
relativetimebuilder = "<2.0.0"
graphene = "*"

[requires]
python_version = "3.7"

@ftobia & @iNightElf
@ftobia is correct the only thing that is actually needed is to specify
relativetimebuilder = "<2.0.0"
I would also recommend to add it in [packages] AND [dev-packages] - that's why it didn't work for me.
I think this workaround fixes the problem, but the underlying issue is still present. Thanks guys for help.

Closing the issue

Was this page helpful?
0 / 5 - 0 ratings