如何解决PyCharm无法导入模块
我正在Linux机器上使用PyCharm。通常,当我导入模块时,例如。 OpenCV或numpy,它可以正常工作。但是,当我尝试导入gphoto2时,出现以下错误。
Collecting gphoto2
Using cached gphoto2-2.2.2.tar.gz (1.9 MB)
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable,possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Command errored out with exit status 1:
command: /home/anders/PycharmProjects/pythonProject/venv/bin/python -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/tmp/pycharm-packaging/gphoto2/setup.py'"'"'; __file__='"'"'/tmp/pycharm-packaging/gphoto2/setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"',open)(__file__);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,__file__,'"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-srufwxku
cwd: /tmp/pycharm-packaging/gphoto2/
Complete output (10 lines):
ERROR: command "pkg-config --modversion libgphoto2" failed
Traceback (most recent call last):
File "<string>",line 1,in <module>
File "/tmp/pycharm-packaging/gphoto2/setup.py",line 36,in <module>
cmd,stderr=FNULL,universal_newlines=True).split('.')[:3]
File "/usr/lib/python3.7/subprocess.py",line 395,in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py",line 487,in run
output=stdout,stderr=stderr)
subprocess.CalledProcessError: Command '['pkg-config','--modversion','libgphoto2']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
有人可以帮我吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。