Skip to content

Instantly share code, notes, and snippets.

@gerritgr
Last active July 8, 2021 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerritgr/bc16f6d4f212e4c7edd915d7926a24be to your computer and use it in GitHub Desktop.
Save gerritgr/bc16f6d4f212e4c7edd915d7926a24be to your computer and use it in GitHub Desktop.
# Install on os x
brew install pipenv
# Init (automatically detects and converts requiremetns.txt)
pipenv install
# after that you can simply change python version in Pipfile if desired
# install packages
pipenv install -r requirements.txt
# or
pipenv install requests~=1.2
# lock (create requirements.txt)
pipenv run pip freeze > requirements.txt
# print dependencies
pipenv graph
# also usefull
pipenv shell
# run
pipenv run python eval.py
# important to reset
pipenv --rm
# if you only want to create req file, you can also do this
pip install pipreqs
pipreqs /home/project/location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment