版权声明:本文为博主原创文章,欢迎转载,请注明出处 https://blog.csdn.net/mouday/article/details/83547883
项目地址:https://github.com/pypa/pipenv
安装
$ pip install pipenv
使用
在项目根目录执行以下语句,常用命令如下
$ pipenv install # 初始化环境
$ pipenv install requests # 安装模块
$ pipenv graph # 查看已安装的包
$ pipenv shell # 启动shell
$ pipenv uninstall --all # 卸载所有
$ pipenv run python hello.py # 运行脚本
$ pipenv -h # 查看帮助
会多出来两个文件Pipfile
, Pipfile.lock
修改pip源
Pipfile文件用记事本打开修改url后面的值为清华大学源
[[source]]
# url = "https://pypi.org/simple"
url = "https://pypi.tuna.tsinghua.edu.cn/simple/"