conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/fastai/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
show_channel_urls: true
ssl_verify: false
# 基于 python3.6 创建一个名为test_py3 的环境
conda create --name test_py3 python=3.6
# 基于 python2.7 创建一个名为test_py2 的环境
conda create --name test_py2 python=2.7
# 激活 test 环境
activate test_py2 # windows
source activate test_py2 # linux/mac
# 切换到python3
activate test_py3
# 安装命令
conda install package_name
# 安装numpy,输入
conda install numpy
# 安装 matplotlib
conda install matplotlib
# 查看已安装的包
conda list
# 搜索安装包
conda search search_term
# 同时安装多个包
conda install numpy scipy pandas
# 安装指定版本的包
conda install numpy=1.11
# 卸载包
conda remove package_name
# 更新包
conda update package_name
# 更新环境中的所有包
conda update --all
教程参考:OpenCV-python安装教程_Ninen_Choi的博客-CSDN博客_opencv-python安装
官网下载(比较慢)
pip install opencv-python
清华镜像下载的安装指令:
pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
# python2.7 下的opencv安装命令
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python==4.2.0.32
ps:这里再附一下国内的镜像源,下载成功概率会高很多吧应该
还是报错的话,再试试指令:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn opencv-python
如果遇到权限问题就再加user:
pip install --user -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn opencv-python
安装opencv遇到的问题ERROR: Could not find a version that satisfies the requirement opencv (from versions: n_Anne332的博客-CSDN博客
https://pypi.tuna.tsinghua.edu.cn/simple/opencv-python/
pip install F:\安装包\opencv_python-4.1.2-cp35-cp35m-win_amd64.whl
又遇到问题:
Python:安装opencv出现错误Could not find a version that satisfies the requirement numpy==1.13.3 (from versions: 1.14.5, 1.14.6, 1.15.0rc2, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0rc1, 1.16.0rc2, - v林三岁 - 博客园
失败失败!!!!
WARNING: Retrying (Retry(total=4, connect=None, read=_叫我小张就行了的博客-CSDN博客
pip install opencv-python -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
终于安装成功了!
python - ImportError: libGL.so.1: cannot open shared object file: No such file or directory - Stack Overflow
apt-get update && apt-get install libgl1
解决问题了
VSCode 卸载并重装(移除拓展和使用历史)_Martin 的博客-CSDN博客_vscode重装
还是win10 ssh vscode连接不上linux
然后vscode还是无动于衷
VS code Remote SSH :Failed to parse remote port from server output_爵11的博客-CSDN博客
然后remote上写上了 Remote SSH的path,仍然报错exit code 255
办法:resolver error connecting with ssh timed out_Joseph__Lagrange的博客-CSDN博客
将useLocalServer设置为True,报其他错误
【Python】在Anaconda中设置清华镜像站并解决“http error“问题_好运宝贝0.0的博客-CSDN博客