美文网首页
python 模块安装

python 模块安装

作者: 千千罐 | 来源:发表于2020-11-02 17:19 被阅读0次
1、pip安装

--user 选项可以设置只安装在当前的用户下,而不是写入到系统目录

pip3 install --user numpy scipy matplotlib

默认情况使用国外线路,国外太慢,我们使用清华的镜像就可以

pip3 install numpy scipy matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple
2、查看python已安装的模块
python3 -m pip list
3、查看模块版本
>>> import numpy
>>> numpy.__version__
'1.19.3'
4. 批量安装模块
pip3 install -r pkg.ls #pkg.ls 列出需要安装的软件

cat pkg.ls
numpy>=1.14.0
scipy>=1.0.0
fastcluster
pandas>=0.22.0
matplotlib>=2.1.1
seaborn>=0.8.1
5. 安装模块指定版本

pip3 install "cnvkit==0.9.7" --prefix="/data/CAP/Software/CNVkit/cnvkit-v0.9.7"

6.安装BeautifulSoup4模块
pip3 install beautifullsoup4

#报错信息
ERROR: Could not find a version that satisfies the requirement beautifullsoup4
ERROR: No matching distribution found for beautifullsoup4

#百度查询了,解决方法,运行以下命令
pip3 install bs4

相关文章

网友评论

      本文标题:python 模块安装

      本文链接:https://www.haomeiwen.com/subject/cytwpktx.html