代码:
import paddlehub
paddlehub.server_check()
报错:
Traceback (most recent call last):
File "D:\Professional\Anaconda\lib\site-packages\IPython\core\interactiveshell.py", line 3369, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
runfile('D:/Project/Pycharm/demo/test.py', wdir='D:/Project/Pycharm/demo')
File "D:\Professional\PyCharm 2020.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "D:\Professional\PyCharm 2020.1\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/Project/Pycharm/demo/test.py", line 1, in
import paddlehub
File "D:\Professional\PyCharm 2020.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "D:\Professional\Anaconda\lib\site-packages\paddlehub\__init__.py", line 20, in
_paddle_version = Version(paddle.__version__)
AttributeError: module 'paddle' has no attribute '__version__'