当前位置:网站首页>Virtualenv and pipenv installation
Virtualenv and pipenv installation
2022-07-02 06:34:00 【bthtth】
One virtualenv install windows edition
1 install
(1)、pip install virtualenv
(2)、pip install virtualenvwrapper-win
(3)、 Just find a plate , Create a directory to store the virtual environment , The directory name is .env perhaps .virtualenv . There is an English full stop in front
(4)、 Add environment variables Variable name WORKON_HOME , value The complete directory created for the previous step
2 virtualenv Use
(1) 、 workon See how many virtual environments there are , The name of the virtual environment that has been created will be listed
(2)、workon+ Name of the environment , Enter the virtual environment
(3)、 Creating a virtual environment ,kmvirtualenv -p python name The name of the virtual environment . Will be in .virtualenv Create a virtual environment under the directory
(4)、 Delete virtual environment ,rm The name of the virtual environment
(5)、pip install + Package name After entering the virtual environment , Use this command to complete the package installation
(6)、pip uninstall + Package name A Uninstall package . It should be noted that , If this bag A And dependent packages B,C,D, Then it will only uninstall A,B,C,D. So use virtuallenv Manage virtual environments , There will be residues when uninstalling . To solve this problem , have access to pipenv
Two install pipenv
1、pip install pipenv
This command is installed , Configure environment variables
pipenv utilize prefile and prefile.lock Record the dependency information of the package
2、 Use pipenv Management package
(1) pipenv install There are many functions
1) pipenv install There is no bag in the back / Module name stay Current directory Create a virtual environment under . After creation , Two files will be generated in the current directory prefile and prefile.lock
prefile In file , Need to put url Change to domestic python Source
dev-packages Record the packages installed in the development environment Record pipenv install Package name --dev
packages Record installation package Record pipenv install Package name Installation of the package
requires Record python edition
pipenv and virtualenv Creating a virtual environment is different .pipenv Is to create the virtual environment to the current path , So when creating , It needs to be done first cd To the right path , Then create ;virtualenv establish , No matter in that path , After creation, they are all in .virtualenv Below directory
2) Install modules or packages in the virtual environment pipenv install Module name / Package name
3) Restore the virtual environment pipenv install Automatic installation prefile In file packages, Will not install dev-pakcages
4) recovery dev-packages pipenv install --dev
(2) View the dependencies of the virtual environment Enter the directory of the virtual environment first , Then input pipenv graph
(3)pipenv uninstall A Uninstall packages in the virtual environment . It should be noted that ,A Will be unloaded , however A The dependency of will not be unloaded . uninstall A when , Will delete prefile and prefile.lock Medium A, So if the project is cloned and restored , Will not recover A And A Dependence
边栏推荐
猜你喜欢
随机推荐
Dynamic global memory allocation and operation in CUDA
pytest(3)parametrize参数化
js中正则表达式的使用
Data science [9]: SVD (2)
Redis——大Key問題
Warp shuffle in CUDA
Don't use the new WP collection. Don't use WordPress collection without update
Sentinel 阿里开源流量防护组件
一口气说出 6 种实现延时消息的方案
Redis - hot key issues
Selenium memo: selenium\webdriver\remote\remote_ connection. Py:374: resourcewarning: unclosed < XXXX > solution
Ruijie ebgp configuration case
稀疏数组(非线性结构)
10 erreurs classiques de MySQL
ctf三计
Cglib agent - Code enhancement test
FE - Eggjs 结合 Typeorm 出现连接不了数据库
CUDA用户对象
AtCoder Beginner Contest 253 F - Operations on a Matrix // 树状数组
Idea announced a new default UI, which is too refreshing (including the application link)