ubuntu 22.04 server python3 包 LTS

ubuntu 22.04 server python3 包 LTS

sudo apt install -y python3-pip

不同的用户的,包的 安装位置不一样
系统默认目录 /usr/lib/python3/dist-packages
然后每个用户 各自的目录是
/home/mike/.local/lib/python3.10/site-packages

sudo apt install -y python3-pip

pip3 install pandas



sudo pip install requests

sudo pip install --upgrade pip

sudo apt update

sudo apt install python3-pip

pip show pyserial

pip show pandas
这个包是 安装在 用户自己的目录里面

Location: /home/mike/.local/lib/python3.10/site-packages
Requires: numpy, python-dateutil, pytz, tzdata
Required-by:

pip show pyserial
pyserial 是 系统默认安装的
这个包是 安装在 系统默认的目录里面

Name: pyserial
Version: 3.5
Summary: Python Serial Port Extension
Home-page: https://github.com/pyserial/pyserial
Author: Chris Liechti
Author-email: cliechti@gmx.net
License: BSD
Location: /usr/lib/python3/dist-packages
Requires:
Required-by:

pytest 不是系统默认安装的
sudo pip install pytest
pip show pytest
位于 /usr/local/lib/python3.10/dist-packages
上面的是 位于
/usr/lib/python3/dist-packages
如果不是 sudo 安装的
会位于
/home/mike/.local/lib/python3.10/site-packages

Name: pytest
Version: 8.3.4
Summary: pytest: simple powerful testing with Python
Home-page: 
Author: Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin, Others (See AUTHORS)
Author-email: 
License: MIT
Location: /usr/local/lib/python3.10/dist-packages
Requires: exceptiongroup, iniconfig, packaging, pluggy, tomli
Required-by: 

加快 python pip 安装 速度

python 虚拟环境

python3 -m venv env
source env/bin/activate

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值