我对 Pycharm 控制台和 Pycharm 终端的不同行为感到困惑。
我在 venv 中安装了一个 dlib 包,并且可以在 Pycharm 终端中成功导入它。没有引发错误。
我的控制台和终端具有相同的环境变量设置(默认设置)。但是当我尝试在控制台中导入 dlib 时,它给了我一个错误说:
import dlib
Traceback (most recent call last):
File "/media/kent/DISK2/virtualenv_gallery/E2ID/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3331, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-14-d25f48e861da>", line 1, in <module>
import dlib
File "/home/kent/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-0/201.7223.92/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
ImportError: /lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found (required by /home/kent/anaconda2/lib/libpng16.so.16)
你能提出任何可能的解决方案吗?谢谢!