关于ImportError:没有名为OpenSSL的模块和python2.7,windows8.1的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于herokupython3:ImportE
关于ImportError:没有名为OpenSSL的模块和python 2.7,windows 8.1的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于heroku python3:ImportError:没有名为’encodings’的模块、ImportError:Python中没有名为*****的模块、ImportError:没有名为oauth2client的模块、ImportError:没有名为objectid的模块等相关知识的信息别忘了在本站进行查找喔。
本文目录一览:- ImportError:没有名为OpenSSL的模块(python 2.7,windows 8.1)(没有名为numpy的模块)
- heroku python3:ImportError:没有名为’encodings’的模块
- ImportError:Python中没有名为*****的模块
- ImportError:没有名为oauth2client的模块
- ImportError:没有名为objectid的模块
ImportError:没有名为OpenSSL的模块(python 2.7,windows 8.1)(没有名为numpy的模块)
我已经安装了pyOpenSSL和所有必需的包,但我不能在shell中导入OpenSSL。 我得到这个错误:
>>> import OpenSSL Traceback (most recent call last): File "<stdin>",line 1,in <module> ImportError: No module named OpenSSL
所有已安装的软件包列表:
cryptography (0.9.3) distribute (0.7.3) idna (2.0) pip (7.1.0) pyasn1 (0.1.8) pyasn1-modules (0.0.5) pyopenssl (0.15.1) requests (2.7.0) service-identity (14.0.0) setuptools (18.1) six (1.9.0) Twisted (15.2.1) urllib3 (1.11) w3lib (1.12.0) zope.interface (4.1.2)
将数据库从一台机器导入/导出到另一台机器
使用Force在Windows上导入大型MysqL .sql文件
在Windows Server 2008中:Powershell无法导入模块ActiveDirectory
无法parsing符号“IoUtils”
如何将PDF转换为文本,以便我可以用PHPparsing文本?
Django uwsgi导入错误
如何永久添加Python导入path?
Windows中的Pygame:ImportError:DLL加载失败
MysqL加载数据:在准备好的语句协议中不支持这个命令
在ELF二进制中导入名称
如果您运行的是64位版本的Windows,那么我建议您安装OpenSSL的Win64版本,可从https://slproweb.com/products/Win32OpenSSL.html (向下滚动,直到找到64位安装程序)和64位版本的pyOpenSSL,可从http://www.egenix.com/products/python/pyOpenSSL/获得
检查你没有32位版本的各种产品,python软件包等。我有一些网站包在PYTHONPATH混淆python。 我删除了环境变量PYTHONPATH和类似的PYTHONUSERBASE(都是由一些软件推荐的,我正在尝试在哪里使用32位版本的mitmproxy并向后工作…)我想保留我的64位版本的Python (2.7.6)因此,当我遇到你在这里报告的同样的错误时,我的斗争。
由于软件包名称是pyOpenSSL,我认为你改变你导入的方式:
import pyOpenSSL
heroku python3:ImportError:没有名为’encodings’的模块
~ $python3 Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named ''encodings'' Aborted (core dumped)
当我在远程bash会话中运行python3时(通过heroku run bash),就会发生这种情况.
heroku日志输出:
2015-03-29T09:41:23.669871+00:00 heroku[bot.1]: Starting process with command `python3 allb.py` 2015-03-29T09:41:24.315878+00:00 heroku[bot.1]: State changed from starting to up 2015-03-29T09:41:24.978050+00:00 app[bot.1]: Fatal Python error: Py_Initialize: Unable to get the locale encoding 2015-03-29T09:41:24.978079+00:00 app[bot.1]: ImportError: No module named ''encodings'' 2015-03-29T09:41:25.811735+00:00 heroku[bot.1]: State changed from up to crashed 2015-03-29T09:41:25.801807+00:00 heroku[bot.1]: Process exited with status 134
我已经尝试将运行时设置为3.4,并寻找类似于问题的解决方案.有些消息来源说$PYTHONPATH必须是零,而heroku上的$PYTHONPATH有值/ app //.
这可能是一些愚蠢的错误,但我找不到它.
解决方法
https://devcenter.heroku.com/articles/python-runtimes
然后在推动你会看到:
遥控器:—–>找到python-2.7.13,删除
遥控器:—–>安装python-3.6.1
ImportError:Python中没有名为*****的模块
我是python的新手,大约一个月了,正在尝试弄清楚python中的导入方式。有人告诉我可以导入其中包含Python代码的任何“模块”。因此,我试图导入一个模块只是为了进行尝试,但我不断收到“
ImportError:没有名为redue的模块”。这是python shell的示例:
>>> import os
>>> os.chdir('C:\Users\Cube\Documents\Python')
>>> for file in os.listdir(os.getcwd()):
print file
pronounce.py
pronounce.pyc
readwrite.py
rectangle.py
reduc.py
>>> import reduc
Traceback (most recent call last):
File "<pyshell#32>",line 1,in <module>
import reduc
ImportError: No module named reduc
我究竟做错了什么?我正在忽略某些东西,还是只是被错误告知?
ImportError:没有名为oauth2client的模块
我正在按照Android版Google登录文档(https://developers.google.com/identity/sign-
in/android/backend-auth)中的说明进行操作,并尝试在我的Python代码中实施令牌验证。
我正在本地主机上开发。出于某种原因,当我尝试将此导入from oauth2client import client, crypt
到我的Google
App Engine后端时遇到此错误,出现以下错误:
ImportError: No module named oauth2client.client`
我已经使用sudo pip install –upgrade google-api-
python(https://developers.google.com/api-client-
library/python/start/installation)安装了oauth2 。安装日志显示:
Requirement already up-to-date: google-api-python-client in /usr/local/lib/python2.7/dist-packages/google_api_python_client-1.5.0-py2.7.eggRequirement already up-to-date: httplib2>=0.8,<1 in /usr/local/lib/python2.7/dist-packages (from google-api-python-client)Downloading/unpacking oauth2client>=2.0.0,<3 from https://pypi.python.org/packages/source/o/oauth2client/oauth2client-2.0.0.post1.tar.gz#md5=6309e12fe2bc0f038708e2c9ec4b1f69 (from google-api-python-client)Downloading oauth2client-2.0.0.post1.tar.gz (66kB): 66kB downloadedRunning setup.py (path:/tmp/pip_build_root/oauth2client/setup.py) egg_info for package oauth2clientwarning: no previously-included files matching ''*'' found under directory ''tests''Requirement already up-to-date: six>=1.6.1,<2 in /usr/local/lib/python2.7/dist-packages (from google-api-python-client)Requirement already up-to-date: uritemplate>=0.6,<1 in /usr/local/lib/python2.7/dist-packages (from google-api-python-client)Requirement already up-to-date: pyasn1>=0.1.7 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=2.0.0,<3->google-api-python-client)Requirement already up-to-date: pyasn1-modules>=0.0.5 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=2.0.0,<3->google-api-python-client)Requirement already up-to-date: rsa>=3.1.4 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=2.0.0,<3->google-api-python-client)Requirement already up-to-date: simplejson>=2.5.0 in /usr/local/lib/python2.7/dist-packages (from uritemplate>=0.6,<1->google-api-python-client)Installing collected packages: oauth2clientFound existing installation: oauth2client 2.0.0-post1Uninstalling oauth2client:Successfully uninstalled oauth2clientRunning setup.py install for oauth2clientwarning: no previously-included files matching ''*'' found under directory ''tests''Successfully installed oauth2client
我看到有人提供了答案,但我不知道如何执行此处描述的符号链接:Google App Engine(python)ImportError:Google App
Engine中没有名为oauth2的模块
我在想这与路径有关,但是我不知道如何设置它以便全局安装oauth2client。我在VM上运行Ubuntu 14.04 LTS。
任何帮助,将不胜感激。
答案1
小编典典我刚刚从Google App Engine
https://cloud.google.com/appengine/docs/python/tools/libraries27#vendoring中找到了此文档,用于将第三方程序包安装到该应用程序。
按照说明,我在项目文件夹内创建了一个名为“ lib”的文件夹,并在项目文件夹内也创建了一个名为appengine_config.py的文件。
在appengine_config.py文件中,输入以下内容:
from google.appengine.ext import vendorvendor.add(''lib'')
然后,在终端上的项目文件夹中,输入sudo pip install -t lib google-api-python-client
。
这工作了!导入不再引发错误。
ImportError:没有名为objectid的模块
我目前在Mac OS X 10.6.8上安装了django-mongodb-engine 0.4.0版本,并且在导入“编译器”模块时奇怪地遇到了一个有趣的错误:
>> from django_mongodb_engine import compiler
我收到以下错误:
ImportError Traceback (most recent call last)
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django_extensions/management/commands/shell_plus.pyc in <module>()
----> 1 from django_mongodb_engine import compiler
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django_mongodb_engine/compiler.pyc in <module>()
15 from pymongo.errors import PyMongoError
16 from pymongo import ASCENDING,DESCENDING
---> 17 from pymongo.objectid import ObjectId,InvalidId
18
19 from djangotoolbox.db.basecompiler import NonrelQuery,NonrelCompiler,\
ImportError: No module named objectid
我通过pip命令安装了该软件包,并且所有依赖项(如pymongo,djangotoolbox)均已安装。我使用的pip命令是这样的:
>> sudo env ARCHFLAGS='-arch i386 -arch x86_64' pip install --upgrade django-mongodb-engine
相关软件包的当前版本为:
>> pip freeze | grep mongo
django-mongodb-engine==0.4.0
pymongo==2.2
我怀疑django_mongodb_engine软件包已损坏,因为ObjectId不再导入pymongo内部。相反,它属于bson模块。
您对解决此问题有何建议?我应该克隆django-mongodb-engine项目并在github上修复吗?
今天关于ImportError:没有名为OpenSSL的模块和python 2.7,windows 8.1的介绍到此结束,谢谢您的阅读,有关heroku python3:ImportError:没有名为’encodings’的模块、ImportError:Python中没有名为*****的模块、ImportError:没有名为oauth2client的模块、ImportError:没有名为objectid的模块等更多相关知识的信息可以在本站进行查询。
本文标签: