[toc]
报错信息:subprocess-exited-with-error
pip install 时报错信息:
1
error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [22 lines of output]
解决方法:
1
pip install --upgrade pip setuptools wheel
Windows下"MINGW64"中运行python没反应
- (1). 可以
pip list
,也可以python --version
,但是直接输入python
就卡那不动了
- (2). 解决方法–>在
MINGW64 git shell
中输入以下命令即可解决:
1 | alias python='winpty python.exe' |
- (3). 但是,发现这只是临时的,关了再重新打开输入
python
,还是没反应 - (4). 永久解决方法,将第2步命令直接复制到以下文件中:
C:\Users\yourcomputer\.bash_profile
参考链接:
[1] https://www.codenong.com/32597209/
FileNotFoundError: Could not find module
- (1).引用
vlc
库时报错:
1 | FileNotFoundError: Could not find module '...\2021\2021-3\libvlc.dll' (or one of its dependencies). |
- (2).解决方法:
①. 首先pip list
查看vlc的版本:
②. 然后,下载并解压对应vlc版本 http://download.videolan.org/pub/videolan/vlc/
③. 将文件夹中plugins
、libvlc.dll
、libvlccore.dll
,复制到添加到已经设置环境变量的文件夹中,这里我直接复制到D:\softwares\Python\Python39\Scripts
中
参考链接:
[1] https://stackoverflow.com/questions/59014318/filenotfounderror-could-not-find-module-libvlc-dll
[2] https://blog.csdn.net/fleaxin/article/details/101943941
④. 解决
Centos 7安装python3
StopIteration
- StopIteration异常,一般是由于迭代时所给的数据超出实际数据范围所致;
- 如果想要正常运行已给出数据范围的程序,则可以处理异常程序:
1
2
3
4
5
6re = iter(range(5))
try:
for i inrange(200):
print("normal: ",re.next())
except StopIteration:
print('Here is stop ',i)
overflow encountered
1 | RuntimeWarning: overflow encountered in det r = _umath_linalg.det(a, signature=signature) |
- 计算行列式时溢出;
- 没解决。
unindent does not match any outer indentation level
- 如果缩进没有问题的画,这个主要是错误主要就是TAB和空格混用了。
- 使用notepad++打开
视图>显示符号>显示空格与制表符
查看缩进。- 修改成一种就可以了。
安装conda报错
1 | Solving environment: failed with initial frozen solve. Retrying with flexible solve. |
- https://tools-platform-guide.readthedocs.io/zh_CN/latest/anaconda/conda%E5%AE%89%E8%A3%85%E7%8E%AF%E5%A2%83%E6%8A%A5%E9%94%99/
- https://blog.csdn.net/qq_35203425/article/details/103872420?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_title~default-4.no_search_link&spm=1001.2101.3001.4242
- 执行:
1 | conda -V |
- 还不行就换conda镜像
1 | channels: |