Pipenv: Difference between revisions

From Wiki
Jump to navigation Jump to search
No edit summary
Line 2: Line 2:
== Install ==
== Install ==
<pre>
<pre>
apt install python-is-python3 python3-pkgconfig
pip3 install --user pipenv
pip3 install --user pipenv
</pre>
</pre>

Revision as of 23:05, 12 July 2023

Install

apt install python-is-python3 python3-pkgconfig
pip3 install --user pipenv

That installs pipenv in ~/.local/bin/ I linked that into my ~/bin/ directory and am now able to run pipenv

Create Project

mkdir -p new_project/app; cd new_project/app
pipenv install Flask  # creates Pipfile, Pipfile.lock
...add some flask code...
pipenv run python app/main.py  # to start testing the app

To run in Docker, add this to the Dockerfile:

pipenv install --deploy --system

Update Python Packages

pipenv update