其它库安装方法
vs2022 配置表加载教程
"cpp": "cd $dir && g++ $fileName -I G:/MinGW_Opencv/opencv4.10/include -I G:/MinGW_Opencv/opencv4.10/include/opencv2 -L G:/MinGW_Opencv/opencv4.10/x64/mingw/bin -l libopencv_world4100 -fexec-charset=gbk -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
不重启生效方法
以修改环境变量“PATH”为例,修改完成后,进入DOS命令提示符,输入:set PATH=C: ,关闭DOS窗口。再次打开DOS窗口,输入:echo %PATH% ,可以发现“我的电脑”->“属性”->“高级”->“环境变量”中设置的 PATH 值已经生效。
pip镜像设置
pip install opencv-contrib-python==4.5.4.60 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install opencv-contrib-python==4.5.4.60 -i https://pypi.tuna.tsinghua.edu.cn/simple
查看有几个虚拟环境
conda info --envs
创建一个虚拟环境
conda create -n t1.12 python==3.6.5
激活一个虚拟环境的方法
activate ten2
查看环境下面安装了哪些库
pip list
conda list
然后pip install or conda install 库名
pip install matplotlib
pip install sklearn
pip install scikit-image
pip install pillow
pip install pandas
pip install matplotlib pillow pandas sklearn pip install opencv-contrib-python==3.4.2.17
pip镜像
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple
pip config set global.trusted-host mirrors.aliyun.com
pip install numpy==1.16
pip install opencv-contrib-python==3.4.2.17
pip install mkl -i https://pypi.tuna.tsinghua.edu.cn/simple
打开jupyter
jupyter notebook
查看有几个虚拟环境
conda info --envs
查看位置
where python
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple pip config set global.trusted-host mirrors.aliyun.com pip镜像 pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple pip config set global.trusted-host https://pypi.tuna.tsinghua.edu.cn
在运行窗口中,输入 %USERPROFILE% 然后按下 Enter 键
假如用户名是Administrator
C:\Users\Administrator
C:\Users\Administrator\AppData\Roaming\pip
运行窗口中尝试
%USERPROFILE%
%USERPROFILE%\AppData\Roaming\pip
pip.ini 文件内容
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = mirrors.aliyun.com
或者是
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn