2

The following error is returned when I clicked the Python console tab in pycharm (bottom left):

Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2020.1\plugins\python-ce\helpers\pydev\pydevconsole.py", line 5, in <module>
    from _pydev_comm.pydev_rpc import make_rpc_client, start_rpc_server, start_rpc_server_and_make_client
  File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2020.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_rpc.py", line 4, in <module>
    from _pydev_comm.pydev_server import TSingleThreadedServer
  File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2020.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_server.py", line 4, in <module>
    from _shaded_thriftpy.server import TServer
  File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2020.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\server.py", line 9, in <module>
    from _shaded_thriftpy.transport import (
  File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2020.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\transport\__init__.py", line 57, in <module>
    from .sslsocket import TSSLSocket, TSSLServerSocket  # noqa
  File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2020.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\transport\sslsocket.py", line 7, in <module>
    import ssl
  File "C:\Users\jkong\anaconda3\lib\ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: DLL load failed: The specified module could not be found.

I am not able to run the program:

enter image description here

and I am always stuck at connecting the console:

enter image description here

I never had this problem before not until I recently reset my computer. PATH was added too, to user environmental variables. How can I fix this?

CountDOOKU
  • 289
  • 3
  • 14

1 Answers1

1

It seems like a path issue that's arising as a result of the path variables not being found by pyCharm.

You can try the solutions proposed in another question since it seems very similar to your problem (in brief: you need to set manually add the PATH variables in PyCharm to the console)

You can also simplyedit python's site.py(in Lib dir) directly and set the path, though I would not highly recommend this:

from os.path import join, abspath, dirname
base_path = dirname(dirname(abspath(__file__)))
os.environ['PATH'] = '%s%s' % (
    os.environ['PATH'],
    join(base_path, 'Library', 'bin'),
)
AzyCrw4282
  • 7,222
  • 5
  • 19
  • 35
  • Hey man thanks for the reply, i tried the solution provided by https://stackoverflow.com/questions/54175042/python-3-7-anaconda-environment-import-ssl-dll-load-fail-error and i worked, or sort of. Yes i got rid of the connecting to the console, but now I have a constant process of REPL communication. What should i do? – CountDOOKU Apr 18 '20 at 05:02
  • can you try the solutions [here](https://stackoverflow.com/questions/44738392/pycharm-waiting-for-repl-response-when-python-console-using-ipython) – AzyCrw4282 Apr 18 '20 at 05:08
  • 1
    Thanks for your effort, but I somehow fixed it and now everything is back to normal (hopefully). Thanks – CountDOOKU Apr 18 '20 at 05:13
  • Feel free to post that as an answer to help others in the future :) – AzyCrw4282 Apr 18 '20 at 05:15