清华源命令行安装scipy
时间: 2024-08-22 17:00:14 浏览: 241
在清华大学源(Tsinghua mirror)使用命令行安装`scipy`通常涉及Python包管理器pip。如果你使用的是Ubuntu或Debian系统,可以先更新软件包列表并添加清华源:
```bash
# 更新软件源
sudo apt-get update
# 添加清华源
echo "deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu $(lsb_release -cs) main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/tuna.list
# 如果需要,更换为中国其他镜像源,如阿里云源或其他
# echo "deb http://mirrors.aliyun.com/ubuntu $(lsb_release -cs) main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/aliyun.list
# 添加apt-key用于验证源码的完整性
wget -O - https://mirrors.tuna.tsinghua.edu.cn/ubuntu/doc/apt-key.gpg | sudo apt-key add -
# 更新软件包列表后,安装scipy
sudo apt-get upgrade
sudo apt-get install python3-scipy
```
如果你使用的是Anaconda或Miniconda环境,可以在终端中通过conda安装:
```bash
conda create -n myenv scipy
conda activate myenv
```
这将创建一个新的Conda环境,并在该环境中安装`scipy`。
阅读全文
相关推荐


















