Creation of python virtual environment and modification of domestic pip source

Computer environment python3.6.5   

Install virtualenv and configure environment variables

 

Use pycharm to create a virtual environment

 

 

Wait for the creation to be completed, you can see the ENV directory, which stores the virtual environment and installed third-party libraries

 

 

Install pipenv, note that the pip source is replaced with a domestic source in advance

# Douban
https://pypi.doubanio.com/simple/
# Alibaba Cloud
https://mirrors.aliyun.com/pypi/simple/
# Tsinghua University
https://pypi.tuna.tsinghua.edu.cn/simple/

 

 

After successful installation, run pip list to view the changes

 

 

 

 

 

Use pipenv graph to view what has been installed. Prompt I have not initialized

 

 

 Follow the prompts to initialize. The installation is complete, 2 new files have been added under the project

 

 

 

 

 

 

Modify the url in the pipfile file to be a domestic source

 

 

 

 

 Try to install a requests using pipenv

 

 

If the installation fails open in Locking []

Check if the url address in the pipfile.lock file is consistent with pipfile

 

Guess you like

Origin www.cnblogs.com/l7planet/p/12721087.html