You can do version control
and package management
at once.
-Packages can be easily separated for each project. -You can easily separate python for each project. -If you specify a version of python that is not installed in pyenv, pyenv will be automatically executed and installed.
pip
2 system
curl -kL https://bootstrap.pypa.io/get-pip.py | sudo python2
3 series
sudo apt-get install python3-distutils && curl -kL https://bootstrap.pypa.io/get-pip.py | sudo python3
pipenv
sudo pip install pipenv
virtualenv-clone, virtualenv, pipenv will be installed in / usr / local / bin /
. (Even if you run it in the local environment of pyenv, it will not be installed in ~ / .pyenv / shims /
! (Of course)
If you install it, you can use it immediately without any settings.
Move to the directory you want to create and execute the following
pipenv --python [Version specification]
Example) When a virtual environment is created in the test_pipenv directory
** [linux] ** ~ / .local / share / virtualenvs / test_pipenv-XxXxXxXx
stores virtual environment data.
pipenv --venv
pipenv shell
Update pip
pip install -U pip
By doing this, only pip in the development environment will be the latest version.
Executable files such as juptyer and pip are in ~ / .local / share / virtualenvs / environment name / bin
, but runtime
in jupyter
is in ~ / .local / share
.
Not recommended as installation is slow
pipenv install pip
exit
pienv --rm
pipenv run python test.py
pipenv run pip show pip
pipenv install package name==version
(Version is optional)
pipenv install --dev package name
Pipfile
pipenv install
pipenv install --dev
pipenv sync
pipenv sync --dev
After update Pipfile.lock is updated
pipenv update
Pipfile
...
...
[scripts]
script = 'echo infinity'
pipenv run script