a way to tell that the virtualenv and Pipfile.lock are in sync?
See original GitHub issueRan the following
pipenv run ...
Creating a virtualenv for this project…
Using /usr/bin/python2.7 to create virtualenv…
⠋Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /home/user/.virtualenvs/...-RVyaMy2x/bin/python2.7
Also creating executable in /home/user/.virtualenvs/...-RVyaMy2x/bin/python
Installing setuptools, pip, wheel...done.
...
ImportError: No module named yaml
Describe your environment
- Ubuntu 16.04
- Python 2.7.12
- pipenv, version 8.3.2
Expected result
Expected one of the following:
- Automatically install dependencies when
pipenv run ...
is called and all dependencies aren’t in the virtualenv - Add optional flag to do 1
- Add command to test if dependencies are installed so that I can run
pipenv install
before runningpipenv run ...
(as it stands now,pipenv install
is fairly time consuming so I don’t want to run it unconditionally) - Modify
pipenv check
to check if all dependencies are installed and correct
I can try to make this change, just wanted to make sure it’s something that you’d be okay merging.
Actual result
Virtualenv was installed but packages were not.
Steps to replicate
Run pipenv run ...
on a python file with Pipfile.lock
present, without running pipenv install
first.
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (12 by maintainers)
Top Results From Across the Web
How to know if a virtualenv requires a sync in order to avoid ...
Currently pipenv doesn't provide a method to check if the existing virtualenv matches the Pipfile.lock it relates to.
Read more >Advanced Usage of Pipenv - Read the Docs
lock is out–of–date, instead of generating a new one. Or you can install packages exactly as specified in Pipfile.lock using the sync command:....
Read more >Basic Usage of Pipenv - Python Packaging Authority
--system — Use the system pip command rather than the one from your virtualenv. --deploy — Make sure the packages are properly locked...
Read more >pipenv Documentation - Read the Docs
PIPENV FEATURES Generates and checks file hashes for locked dependencies when installing from Pipfile. lock. Automatically install required Python version when ...
Read more >Common Pipenv Errors and How to Solve Them: Why Won't it ...
Locking Issue: Pipfile Contains a Reference to an Inexistent Package ... Pipfile won't lock when it tries to install packages that don't exist,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i don’t care what your expectation is, i’m closing it. thank you — it has been noted, as i said 😃
It would be super useful for speeding up CI builds if
sync
had a flag to exit if everything is in sync. A lot of SaaS CI platforms include code caches such as Travis, AWS codebuild, Bitbucket Pipelines, etc. The code cache is restored at the beginning of a run and if the dependencies didn’t require updates it could shave 30s or more off of the build.As it is
pipenv sync --dev
takes about 30s with a private build. It contains 100 or so deps in total. Ifpipenv verify
(or whatever) had a return code of1
on “out of sync” and0
when it’s “in sync”.Basically it would allow me to write something like this;
If pipenv did the above internally that would be even better!
I will look at doing a diff between
pipenv lock -r
andpip freeze
in the interim.