Python pip install 默认路径修改。
pip动不动就下载数百M的文件。这些文件默认在C:盘,那么为了节省空间需要修改这些路径:
打开cmd命令窗口。输入:
python -m site
C:\Users\hewei>python -m site
sys.path = [
'C:\\Users\\xxx',
'D:\\Program Files\\Python37\\python37.zip',
'D:\\Program Files\\Python37\\DLLs',
'D:\\Program Files\\Python37\\lib',
'D:\\Program Files\\Python37',
'D:\\Program Files\\Python37\\lib\\site-packages',
]
USER_BASE: 'C:\\Users\\xxx\\AppData\\Roaming\\Python' (doesn't exist)
USER_SITE: 'C:\\Users\\xxx\\AppData\\Roaming\\Python\\Python37\\site-packages' (doesn't exist)
ENABLE_USER_SITE: True
可以看到你的python安装目录,和
USER_SITE:自定义Python依赖安装包的基础路径。
USER_BASE:自定义Python脚本
python -m site -help
查看site.py的路径
C:\Users\hewei>python -m site -help
D:\Program Files\Python37\lib\site.py [--user-base] [--user-site]
打开site.py 修改:

修改为自己路径。这里要注意尽量写到python目录下
在利用pip谁便安装一个包。去USER_SITE目录下发现包在这里已经成功了
Python pip install 默认路径修改。的更多相关文章
- pip install 默认安装路径修改
一.使用命令查看pip默认安装目录 python -m site 这里的USER_BASE和USER_SITE其实就是默认的启用Python通过pip自动下载的脚本和依赖安装包的基础路径. 接着使用命 ...
- Oculus Store游戏下载默认路径修改方法
最近在测试一款VR游戏,所以在硬件设备上选择了HTC Vive和Oculus两款眼镜.相对而言,HTC安装比较人性化:支持自定义安装路径,而且可在界面更改应用程序下载位置,如图所示: 这下替我节省了不 ...
- python pip install matplotlib安装模块
python pip install matplotlib安装模块,可附带安装相关的模块 程序运行提示: from . import _imaging as coreImportError: DLL ...
- python pip install 报错TypeError: unsupported operand type(s) for -=: 'Retry' and 'int' Command "python setup.py egg_info" failed with error code 1 in
pip install http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl ...
- macosx 10.11 python pip install 出现错误OSError: [Errno 1] Operation not permitted:
Exception: Traceback (most recent call last): File , in main status = self.run(options, args) File , ...
- How To:python pip install
官方网站 https://pypi.python.org/pypi/pip/ 下载需要的版本 wget https://pypi.python.org/packages/source/p/pi ...
- python pip install mysql-connector-python
sudo pip install mysql-connector-python 报错信息:Collecting mysql-connector-python Could not find a vers ...
- Python pip install Twisted 出错“Command "c:\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:...\\Twisted\\setup.py'.... failed with error code 1 in C:... \\Twisted"
如标题所说: python版本是目前最新的3.7.1 结果发现并不是环境问题,而是直接 pip install Twisted 安装的包不兼容 需要手动下载兼容的扩展包Twisted-18.9.0-c ...
- python pip install error
使用pip install的时候报错 解决方法是使用如下的命令进行安装 python -m pip install sqlalchemy 升级pip的命令python2 -m pip install ...
随机推荐
- (数据科学学习手札100)搞定matplotlib中的字体设置
本文示例文件已上传至我的Github仓库https://github.com/CNFeffery/DataScienceStudyNotes 1 简介 matplotlib作为数据可视化的利器,被广泛 ...
- 快用Django REST framework写写API吧
Django默认是前后端绑定的,提供了Template和Form,现在流行前后端分离项目,Python大佬坐不住了,于是便有了Django REST framework:https://github. ...
- Application Data in Docker 笔记
Application Data in Docker By default all files created inside a container are stored on a writable ...
- Attention & Transformer
Attention & Transformer seq2seq; attention; self-attention; transformer; 1 注意力机制在NLP上的发展 Seq2Seq ...
- 将XML转换为实体
需求 将XML文件中的数据经过转换后插入到数据库中. 参考 C#实体类和XML的相互转换 https://blog.csdn.net/pan_junbiao/article/details/82938 ...
- MALL的学习笔记启动计划
基本网络文档:http://www.macrozheng.com/#/ 电子书: Spring: <Spring实战(第4版)> Springboot: <Spring Boot实战 ...
- java代理(静态代理和jdk动态代理以及cglib代理)
版权声明:本文为Fighter168原创文章,未经允许不得转载. 目录(?)[+] 说到代理,脑袋中浮现一大堆代理相关的名词,代理模式,静态代理,jdk代理,cglib代理等等. 记忆特别深刻 ...
- C#——时间之不同国家的显示格式
对于时间的显示,不同的地方有不同的时间格式,代码如下: public class Common_DateFormat { public Common_DateFormat() { // // TODO ...
- [转载]Mybatis Generator最完整配置详解
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration ...
- java上下分页窗口流动布局
上下分页要用到 JSplitPane jSplitPane =new JSplitPane();//设定为拆分布局 效果图: show me code: import java.awt.event.C ...