[zz] Python 3.7 anaconda environment - import _ssl DLL load fail error

https://stackoverflow.com/questions/54175042/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 <module>
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 <module>
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 <module>
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 <module>
from _shaded_thriftpy.transport import (
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.1\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 2018.1.1\helpers\third_party\thriftpy\_shaded_thriftpy\transport\sslsocket.py", line 7, in <module>
import ssl
File "C:\Users\abhil\AppData\Local\Continuum\anaconda3\envs\HeisenbergPy37\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.
Process finished with exit code 1

D:\Anaconda3\python.exe "D:\Program Files\JetBrains\PyCharm 2018.3.3\helpers\pydev\pydevconsole.py" --mode=client --port=55113
Traceback (most recent call last):
File "D:\Program Files\JetBrains\PyCharm 2018.3.3\helpers\pydev\pydevconsole.py", line 5, in <module>
from _pydev_comm.rpc import make_rpc_client, start_rpc_server, start_rpc_server_and_make_client
File "D:\Program Files\JetBrains\PyCharm 2018.3.3\helpers\pydev\_pydev_comm\rpc.py", line 4, in <module>
from _pydev_comm.server import TSingleThreadedServer
File "D:\Program Files\JetBrains\PyCharm 2018.3.3\helpers\pydev\_pydev_comm\server.py", line 4, in <module>
from _shaded_thriftpy.server import TServer
File "D:\Program Files\JetBrains\PyCharm 2018.3.3\helpers\third_party\thriftpy\_shaded_thriftpy\server.py", line 9, in <module>
from _shaded_thriftpy.transport import (
File "D:\Program Files\JetBrains\PyCharm 2018.3.3\helpers\third_party\thriftpy\_shaded_thriftpy\transport\__init__.py", line 57, in <module>
from .sslsocket import TSSLSocket, TSSLServerSocket # noqa
File "D:\Program Files\JetBrains\PyCharm 2018.3.3\helpers\third_party\thriftpy\_shaded_thriftpy\transport\sslsocket.py", line 7, in <module>
import ssl
File "D:\Anaconda3\lib\ssl.py", line 98, in <module>
import _ssl # if we can‘t import it, let the error propagate
ImportError: DLL load failed: 找不到指定的模块。
Process finished with exit code 1

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

  1. Open your Anaconda cmd
  2. Activate your Conda environment
  3. Get the full PATH value by typing echo %PATH%
    • if you are on Windows 7/can‘t copy the output, cd the cmd to your desktop and type echo %PATH% > path_val.txt
    • this will create a txt file so you can copy/paste the values easier.
  4. In PyCharm, go to Settings -> Build, Execution, Deployment -> Console -> Python Console -> click the folder on the right of Environment variables.
  5. 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.
  6. Click OK, then apply.

原文地址:https://www.cnblogs.com/xfzhang/p/10629787.html

时间: 2024-10-10 10:11:47

[zz] Python 3.7 anaconda environment - import _ssl DLL load fail error的相关文章

python import cv2异常(dll load fail / windows server 2008)

最近服务器迁移,从得win7系统迁移到云服务器器上的windows server2008系统,迁移过程中安装Python的opencv一直出错,不管是用whl安装或者是在线pip安装都报错,尝试打包成exe也是同样,提示dll load fail.(如果你刚好也是cv2报错dll load fail,而且也是windows server系统,受这个问题困扰,可以接着往下看) 问题应该就是dll缺失,但具体怎么缺失一时半会找不到.这时候就得咨询百度.谷歌了,百度了一轮,发现有类似的情况,但没发现具

from scipy import spatial 出现 from .qhull import * ImportError: DLL load failed: The specified module could not be found. 错误

错误描述: 本人机器window8.1 64位,python2.7. Traceback (most recent call last): File "C:/Users/Hamid/Documents/kodeyaro/kodefolani.py", line 41, in <module> from scipy.spatial import Delaunay File "C:\Python27\lib\site-packages\scipy\spatial\__

python import win32clipboard 报错DLL load failed: %1 不是有效的 Win32 应用程序。

在python中引入win32clipboard时报错,DLL load failed: %1 不是有效的 Win32 应用程序 >>> import win32clipboardTraceback (most recent call last):  File "<stdin>", line 1, in <module>ImportError: DLL load failed: %1 不是有效的 Win32 应用程序. 查了一下,是因为我64位

【初学python】错误SSLError: [Errno 1] _ssl.c:504:的解决记录

最近在实习公司学习使用python做web自动化测试,其中使用到httplib这个模板,主要用于与待测试界面建立HTTP连接,发送数据请求,接收请求状态码和查询数据,验证功能.但是新版本的web界面改成使用https协议,原来的测试用例都变成无法跑通的状态. 将协议从HTTP改成HTTPS后,报以下错误: SSLError: [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown proto

Python中关于导入(import)语句的使用说明

在所有的语言中,语言的开发者都会为我们提供强大的库文件供我们调用,通过使用这些库文件,我们才可以把程序完美的运行起来,既然要用到库文件,我们就要导入我们需要使用的库文件,因为,机器是不知道我们想基于哪些库进行程序的编写的.在导入库的时候,不同的语言有自己的风格.例如在C/C++等语言中,我们使用#include <>或者#include ""来导入库或者头文件.那么在python中我们怎么导入库呢. 首先,在Python中,我们可以导入三种库:Python标准模块,Pyth

zz Python datetime / time conversions

Python datetime / time conversions Date: 2008-11-12  |   Tags: datetime, python   |   3 Comments from datetime import datetime import time #------------------------------------------------- # conversions to strings #----------------------------------

关于Python Package下的Module import方式[转]

2012年有一个目标我没有达成,那就是深入学习和使用Python语言.这个目标被其他学习任务和工作无情的抢占了,当然最主要的原因还是我重视不够^_^. 近期恰逢有一些Python工程的开发工作要做,就顺便略微深入地学习了一下Python:看了几本Python的英文大部头,比如<Learning Python 4th Edition>.<Python Essential Reference 4th Edition>.<Programming Python 4th Edition

[zz]Python 3.4 and Pillow 2.4 with JPEG2000 (openjpeg 2) support in Ubuntu 14.04

Pillow support for JPEG2000 comes from openjpeg 2 library. Unfortunatly, Ubuntu's libopenjpeg2 package is not version 2 of the openjpeg library, but actually version 1.3 which wont work with Pillow. Installing Pillow 2.4 (pip install -I pillow) simpl

升级python以及安装anaconda

今天一个同事要求我给一台服务器升级python以及安装anaconda 恩,python我会装但是anaconda听都没听过啊?这是啥东西,然后我问了下主管怎么装,他居然说他也不知道怎么装!你妈嗨 你不是从公司创立开始就在了吗!这些东西你居然不知道怎么装! 没办法,只能自己研究了.总之先找好安装程序 anaconda 2.4.1  下载连接:http://repo.continuum.io/archive/Anaconda3-2.4.1-Linux-x86_64.shpython3.5.1