Traceback (most recent call last): File "/Users/xiaotang/PycharmProjects/untitled2/SHIYOU.py", line 5, in <module> from networkx.tests.test_all_random_functions import np File "/Users/xiaotang/PycharmProjects/untitled2/venv/lib/python3.8/site-packages/networkx/tests/test_all_random_functions.py", line 1, in <module> import pytest ModuleNotFoundError: No module named 'pytest' Process finished with exit code 1'
时间: 2023-09-13 13:06:16 浏览: 68
linux 下 pip3 报错“ File “/usr/bin/pip3”, line 9, in from pip import mainImportError: canno”处理
5星 · 资源好评率100%
这个错误提示是在运行Python代码时出现的,它说找不到名为pytest的模块。这意味着你需要安装pytest模块才能运行这个代码。你可以使用以下命令在终端中安装pytest模块:
```
pip install pytest
```
安装完成后,再次运行代码即可。
阅读全文