Use pytest to execute the case.py file on the terminal and report an error Modulenotfounderror: no module named ‘API’. Actually, I have an API package,
The right-click run in pycharm can be executed.
In the first line of the case file to be executed (which must be the front of all references), add
import os,sys sys.path.append(r"D:/python-workspace/interfacePytest") append followed by the absolute path to the project
Similar Posts:
- [Solution] systemerror: the solution of parent module ” not loaded, cannot perform relative Import
- Pycharm ImportError: No module named selenium [How to Solve]
- Error reporting of importing tensorflow package from pycharm
- Two pits with Jenkins operation error
- [Solved] Pytest: error: unrecognized arguments error reporting solution
- How to Solve Centos Yum Error: No module named yum
- [Solved] ImportError:attempted relative import with no known parent package
- ImportError: No module named caffe.proto [How to Solve]
- ModuleNotFoundError No module named urllib2
- [Solved] rosrun import rospy Error: ImportError: No module named yaml