0

I am confused about different behaviours of Pycharm console and Pycharm terminal.

I installed a dlib package in a venv and can import it successfully in Pycharm terminal. No error raised.

My console and terminal have the same environments variable settings (which are default). But when I tried to import dlib in the console, it gave me an error saying:

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)

Could you suggest any possible solution? Thanks!

F Bai
  • 103
  • 9
  • How about this answer? https://stackoverflow.com/questions/54110329/import-fails-in-terminal-but-works-in-pycharm – shimo Jun 15 '20 at 10:13
  • @shimo, thanks. But unfortunately, it is not very relevant to this question. I think my question is more about to figure out how Pycharm starts its interactive python environment. – F Bai Jun 15 '20 at 10:25

0 Answers0