pipenv is good to use, but often installing some packages can"t solve the dependency problem. For example, I recently used a dogpile.cache, using pipenv install dogpile.cache==0.7.1
to install and report an error.
I see that the error message probably cannot create a dependency, but through pipenv graph
you can see that the package exists, the dogpile.cache
depends on the decorator
diagram, and the Pipfile
file is also written into the package content, but the Pipfile.lock
does not create a dependency.
this causes me to update Pipfile.lock
every time I install another package, because dogpile.cache
cannot create dependencies, so it reports an error every time you install a new package.
- from the above, I also concluded that
pipenv graph
seems to have little to do withPipfile.lock
.Pipfile.lock
files do not have dependencies. You can still see the dependency graph frompipenv graph
. Of course, you can ignore the error report and continue to use .
- the information of
dogpile.cache
can be deleted fromPipfile
, so there is no error report, but this is not a good solution, is it? thePipfile
file is to maintain package information. One is good, but I have to deal with it manually. - in addition, the official
-- skip-lock
command skips dependencies during installation. This is how I usepipenv install-- skip-lock dogpile.cache==0.7.1
, but this command doesn"t work at all. After installing the package, I executedInstalling dependencies from Pipfile
. The following is the error message:
(flask_starlight) liuzhi@localhost ~/PycharmProjects/flask_starlight master pipenv install --skip-lock dogpile.cache==0.7.1
Installing dogpile.cache==0.7.1
Adding dogpile.cache to Pipfile"s [packages]
Installation Succeeded
Installing dependencies from Pipfile
An error occurred while installing dogpile-cache==0.7.1! Will try again.
9/9 00:00:01
Installing initially failed dependencies
[pipenv.exceptions.InstallError]: File "/Users/liuzhi/anaconda3/lib/python3.6/site-packages/pipenv/core.py", line 1992, in do_install
[pipenv.exceptions.InstallError]: skip_lock=skip_lock,
[pipenv.exceptions.InstallError]: File "/Users/liuzhi/anaconda3/lib/python3.6/site-packages/pipenv/core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]: File "/Users/liuzhi/anaconda3/lib/python3.6/site-packages/pipenv/core.py", line 859, in do_install_dependencies
[pipenv.exceptions.InstallError]: retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[pipenv.exceptions.InstallError]: File "/Users/liuzhi/anaconda3/lib/python3.6/site-packages/pipenv/core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]: _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]: File "/Users/liuzhi/anaconda3/lib/python3.6/site-packages/pipenv/core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ["Collecting dogpile-cache==0.7.1"]
[pipenv.exceptions.InstallError]: ["Could not find a version that satisfies the requirement dogpile-cache==0.7.1 (from versions: )", "No matching distribution found for dogpile-cache==0.7.1"]
ERROR: ERROR: Package installation failed...
0/1 00:00:01
< H2 > ask < / H2 >
doesn"t that make a fool of it? is it my official command error that skips dependence? Or is it not the same effect in terms of understanding? At present, I have two choices: modify Pipfile
, or ignore the error. I don"t know how the bosses use pipenv, because I have encountered too many packages that can"t solve the dependency