pip 指定安装位置

2023-05-16

 离线安装且指定位置

sudo pip3 install  --no-index --find-links=./requirements  -r requirements.txt  --target=/usr/lib/python3/dist-packages

临时使用换源

pip  install xxx -i  https://mirrors.aliyun.com/pypi/simple

pip 修改默认位置,输入

python3 -m site -help

找到site.py的位置

修改USER_SITE 和 USER_BASE 的路径为自行设定路径即可。

然后可以重新查看一下新的默认安装位置,

python3 -m site

pip install 默认安装路径修改 - 潜水的阳光 - 博客园

区分一下pip3 install --user 和 pip3 install -U 

前者是在用户当前目录下,后者是升级的意思

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

pip 指定安装位置 的相关文章

随机推荐

  • c++打印enum class

    span class token keyword enum span span class token keyword class span span class token class name A span span class tok
  • 使用strace查找Emacs启动阻塞的原因(exec-path-from-shell)

    原文地址 https www lujun9972 win blog 2019 09 26 使用strace查找emacs启动阻塞的原因 exec path from shell index html 之前就觉得我的Emacs启动好慢 xff
  • 为Linux安装虚拟PDF打印机

    原文地址 https lujun9972 github io blog 2020 04 11 为linux安装虚拟pdf打印机 index html 今天发现一个 CUPS PDF 项目 可以为 CUPS Common Unix Print
  • ubuntu系统启用shell远程登陆

    Ubuntu desktop系统安装后 xff0c 想使用shell远程登陆 xff0c 会提示 Connecting to 192 168 220 133 22 Could not connect to 39 192 168 220 13
  • 枚举类(ENUM)用法总结

    对于ENUM一直是比较陌生的 xff0c 在和某酷爱ENUM的大神合作时 xff0c 才慢慢接触到ENUM的用法 1 ENUM是什么 xff1f 首先ENUM是一个类 xff0c 不像String int之类的数据结构 xff0c 更类似于
  • Python循环结构练习2

    Problem A xff1a 循环结构 输出数列2 xff0c 5 xff0c 8 xff0c 11 xff0c 14 题目描述 输入正整数n xff08 n 100 xff09 xff0c 输出数列2 xff0c 5 xff0c 8 x
  • KVM网络模型之:PCI Passthrough

    目录 PCI Passthrough技术介绍和KVM中配置 案例 内核启用 重新启动虚拟机实例 PCI Passthrough技术介绍和KVM中配置 PCI Passthrough技术是虚拟化网卡的终极解决方案 xff0c 能够让虚拟机独占
  • 微信开放公众平台,扩展自定义类,定时提醒,定时发消息

    微信开放公众平台 xff0c 扩展自定义类 xff0c 定时提醒 xff0c 定时发消息 lt php class MyapiAction extends BaseAction public function index 微医疗 预约提醒
  • Ubuntu配置iptables规则

    Ubuntu配置防火墙 xff0c 并且开机iptables自启动规则 适用于CentOS 1 登录root账号 span class token comment 切换到root账号 span super 64 super span cla
  • Linux记录用户执行命令

    span class token shebang important bin bash span span class token comment By lumia98 64 vip qq com span span class token
  • Nginx规则配置实例

    配置某个ip或者页面禁止访问及跳转方法 server listen 80 server name www test com cn location proxy redirect off proxy set header host host
  • Debian 11.2安装ssh服务

    切换到root用户 更新软件源 span class token function apt get span update 安装ssh span class token function apt get span span class to
  • Python计算文件大小

    span class token comment usr bin env python span span class token comment coding utf 8 span span class token triple quot
  • Python获取文件内的下一行数据

    span class token comment usr bin env python span span class token comment Version 61 3 8 1 span span class token comment
  • iptables配置实例

    查看当前所有规则 iptables L n 查看所有规则 iptables nL line number 显示行 iptables nvL line number 显示行 清空所有配置 iptables F iptables X iptab
  • 利用Shell脚本校验数据一致性

    span class token shebang important bin bash span span class token comment span span class token comment 检测两台服务器指定目录下的文件一
  • Debian11系统Redis源码安装

    span class token shebang important bin bash span span class token comment Debian11 Redis6 2 6安装 span span class token co
  • iOS 根据文字内容设置cell 的高度

    今天学习一个简单的 根据内容的大小设置cell 的高度 第一步 建两个类 分别继承于UIViewController 和UITableViewCell 第二步 mainViewController h import lt UIKit UIK
  • Python下载GitHub数据

    配置文件 span class token punctuation span Source span class token punctuation span Source path span class token operator 61
  • pip 指定安装位置

    离线安装且指定位置 sudo pip3 install no index find links 61 requirements r requirements txt target 61 usr lib python3 dist packag