DeprecationWarning: the imp module is deprecated in favour of importlib
The reason for this problem is that the imp library is abandoned after Python 3.4 and the importlib library is used, so we can change the source file of our compiler pycham
In this directory, C:\pycharm 5.0 4\helpers\pycharm (check according to your installation path) has two files
1. docrunner.py
2. utrunner.py
1. Comment out imp
, import importlib
2. Comments imp.load_Source
, use importlib machinery.Sourcefileloader
load module
#import imp import importlib #module = imp.load_source(moduleName, fileName) module = importlib.machinery.SourceFileLoader(moduleName, fileName).load_module()
Similar Posts:
- Django startup error: generator expression must be parentized
- Tensorflow ImportError: DLL load failed with error code -1073741795
- Python solves the problem of NameError: name ‘reload’ is not defined
- django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named ‘M…
- Problem solved successfully in Python: attributeerror: ‘module’ object has no attribute ‘loadimage‘
- Merfish error: error 1 libgrid.dylib not found [How to Solve]
- Common problems and solutions of checkstyle error reporting
- Solve the problem of attributeerror: module ‘Matplotlib’ has no attribute ‘verb
- Pycharm ImportError: No module named selenium [How to Solve]
- docker:ImportError: libcuda.so.1: cannot open shared object file: No such file or directory