At runtime, jekins will take all folder paths of the current project as the search path of the package, while the command line only searches the current path by default.
Error message: modulenotfounderror: no module named ‘xxx’#
Solution:
Configure environment variables in jekins: system management → system settings (global settings and paths)
1.Global properties check Environment variables
2.Add new key-value pairs
Key:PYTHONPATH
Value:/var/lib/jenkins/workspace/project name
Similar Posts:
- Jenkins – mvn: command not found
- Two pits with Jenkins operation error
- Jenkins management interface Error: incorrect reverse proxy settings [How to Solve]
- The “git” item cannot be recognized as the name of a cmdlet, function, script file, or executable program. Please check the spelling of the name, if you include the path, make sure the path is correct
- [Solved] jenkins Build python Program Error: ModuleNotFoundError: No module named ‘htmltestreport’
- An error is reported when the docker command is executed in Jenkins
- [Solved] JPype Error: FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/lib/jvm’
- Android Studio Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT (Solved)
- [Solved] Python import _ SSL DLL load fail error the module problem could not be found
- Requested setting INSTALLED_APPS, but settings are not configured. …..DJANGO_SETTINGS_MODULE…..