使用PyCharm编写Python代码,Python输出窗口报错解决方案 Python 3.7 anaconda environment - imp...

栏目: Python · 发布时间: 5年前

内容简介:使用PyCharm编写Python代码,Python输出窗口报错解决方案 Python 3.7 anaconda environment - import _ssl DLL load fail errorC:\Users\abhil\AppData\Local\Continuum\anaconda3\envs\HeisenbergPy37\python.exe “C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.1\helpers\pyd

使用PyCharm编写 Python 代码,Python输出窗口报错解决方案 Python 3.7 anaconda environment - import _ssl DLL load fail error

问题回放

C:\Users\abhil\AppData\Local\Continuum\anaconda3\envs\HeisenbergPy37\python.exe “C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.1\helpers\pydev\ pydevconsole.py ” --mode=client --port=63950

Traceback (most recent call last):

File “C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.1\helpers\pydev\ pydevconsole.py ”, line 5, in

from _pydev_comm.rpc import make_rpc_client, start_rpc_server, start_rpc_server_and_make_client

File “C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.1\helpers\pydev_pydev_comm\ rpc.py ”, line 4, in

from _pydev_comm.server import TSingleThreadedServer

File “C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.1\helpers\pydev_pydev_comm\ server.py ”, line 4, in

from _shaded_thriftpy.server import TServer

File “C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.1\helpers\third_party\thriftpy_shaded_thriftpy\ server.py ”, line 9, in

from

shaded_thriftpy.transport import (

init
.py", line 57, in

from .sslsocket import TSSLSocket, TSSLServerSocket # noqa

File “C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.1\helpers\third_party\thriftpy_shaded_thriftpy\transport\ sslsocket.py ”, line 7, in

import ssl

File “C:\Users\abhil\AppData\Local\Continuum\anaconda3\envs\HeisenbergPy37\lib\ ssl.py ”, line 98, in

import _ssl # if we can’t import it, let the error propagate

ImportError: DLL load failed: The specified module could not be found.

Process finished with exit code 1

解决方案

his can be fixed by manually adding in the PATH variables in PyCharm to the console.

  1. Open your Anaconda cmd(Anaconda Prompt)
  2. Activate your CondaActivate your Conda environment
  3. Get the full PATH value by typing echo %PATH%
  4. if you are on Windows 7/can’t copy the output, cd the cmd to your desktop and type echo %PATH% > path_val.txt
  5. In PyCharm, go to Settings -> Build, Execution, Deployment -> Console -> Python Console -> click the folder on the right of Environment variables.
  6. Click the plus button to add a new Environment Variable --> The name should be PATH ,The value is the entire output from the echo %PATH% command above.
  7. Click OK, then apply.

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

设计模式之禅

设计模式之禅

秦小波 / 机械工业出版社 / 2010年3月 / 69.00元

如果说“四人帮”的《设计模式》是设计模式领域的“圣经”,那么之后出版的各种关于设计模式的书都可称之为“圣经”的“注释版”或“圣经的故事”。本书是得道者对“圣经”的“禅悟”,它既不像“圣经”那样因为惜字如金、字字珠玑而深奥、晦涩和难懂,又比“圣经”的“注释版”更深刻和全面、更通俗和生动、更接近开发者遇到的实践场景,更具指导性。本书兼收并蓄、博采众长,也许是设计模式领域里的下一个里程碑之作。 全......一起来看看 《设计模式之禅》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

html转js在线工具
html转js在线工具

html转js在线工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换