Looking in indexes: https://pypi.doubanio.com/simple Requirement already satisfied: onnx>=1.12.0 in /root/miniconda3/envs/test/lib/python3.8/site-packages (1.14.0) Requirement already satisfied: protobuf>=3.20.2 in /root/miniconda3/envs/test/lib/python3.8/site-packages (from onnx>=1.12.0) (4.23.1) Requirement already satisfied: typing-extensions>=3.6.2.1 in /root/miniconda3/envs/test/lib/python3.8/site-packages (from onnx>=1.12.0) (4.5.0) Requirement already satisfied: numpy in /root/miniconda3/envs/test/lib/python3.8/site-packages (from onnx>=1.12.0) (1.24.2) requirements: 1 package updated per ['onnx>=1.12.0'] requirements: ⚠️ Restart runtime or rerun command for updates to take effect ONNX: export failure ❌ 3.4s: No module named 'onnx'
时间: 2023-10-30 08:08:42 浏览: 171
根据提示,你已经安装了`onnx`的依赖包,但在导出ONNX模型时出现了错误。错误提示为"No module named 'onnx'",这意味着Python无法找到`onnx`模块。可能的原因是:
- `onnx`模块没有正确安装。你可以尝试重新安装`onnx`模块,使用命令`pip install onnx`。
- 环境变量没有正确设置。你需要确保Python能够找到`onnx`模块所在的路径。你可以通过在Python中执行`import onnx; print(onnx.__file__)`来查看`onnx`模块的路径。如果该命令无法找到`onnx`模块,则需要将`onnx`模块所在的路径添加到PYTHONPATH环境变量中。
- 如果你在使用conda虚拟环境,请确保已经在正确的虚拟环境中安装了`onnx`模块。
相关问题
Looking in indexes: https://repo.huaweicloud.com/repository/pypi/simple Requirement already satisfied: PCV in ./miniconda3/lib/python3.8/site-packages (0.0.2) Requirement already satisfied: jinja2 in ./miniconda3/lib/python3.8/site-packages (from PCV) (3.1.2) Requirement already satisfied: MarkupSafe>=2.0 in ./miniconda3/lib/python3.8/site-packages (from jinja2->PCV) (2.1.2)
这段提示信息显示你已经安装了PCV,版本号为0.0.2,并且依赖的Jinja2和MarkupSafe库也已经安装好了。这意味着你可以在代码中使用PCV库了。
如果你想检查库是否安装成功,可以在Python交互式环境中输入以下命令:
```
import PCV
```
如果没有报错,说明库已经成功安装。你可以继续阅读PCV的文档,学习如何使用这个库。
Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: pillow in /usr/lib/python3/dist-packages (5.1.0)
这不是一个问题,而是一段Python代码。它的作用是检查系统是否有写入权限来安装Python包,如果没有就将包安装在用户目录下。接着这段代码查找了一个国内的源来获取需要安装的包,然后发现已经安装了pillow包(版本为5.1.0)。
阅读全文
相关推荐
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231044901.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)