importerror

google-app-engine : ImportError httplib2 in google api python client hello world

两盒软妹~` 提交于 2019-12-13 01:24:47
问题 I just downloaded the Google App Engine SDK for python (google_appengine_1.6.5.zip) and i try to launch an example from google-api-python-client (appengine) : $ tree . |-- app.yaml |-- client_secrets.json |-- grant.html |-- index.yaml |-- main.py `-- welcome.html I launch dev server : : ./dev_appserver.py /home/yoyo/dev/projets/yoyocontacts/ --backends --clear_datastore --high_replication But when i launched application in my browser, i have the following error : ImportError: No module named

Issue With Relative Imports In Python

眉间皱痕 提交于 2019-12-13 00:39:52
问题 I'm running into an issue with how to properly declare imports for some modules that I've written. Suppose the follow directory structure: main_dir/ __init__.py module_A sub_dir/ __init__.py module_B module_C So that modules B and C are both in the same subdirectory relative to module A. Module B imports C. Module A sometimes imports B. So, in Module B, using import module_C works fines. And in Module A, using import sub_dir.module_C works fine. However, in Module A, using import sub_dir

关于 python ImportError: No module named 的问题

一个人想着一个人 提交于 2019-12-12 20:26:48
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 今天在 centos 下安装 python setup.py install 时报错:ImportError: No module named sysconfig, 当时急着用,就顺手直接源码编译了一把,make install 后就 ok 了。 然后又在 cygwin 下安装时同样的问题,这下 cygwin 源码编译也不行了,因为会调用很多 linux 特有的类库。 虽然最后解决了 import 的问题,但是又报了其它错。比如 ldconfig 啥的,可能是我cygwin环境没装全。 只有换方法:从cygwin开源镜像上下载好 cygwin binary 版本的 python 2.7.3, 然后覆盖到相应的目录即可。 事后我查了下 python 的import机制,以备忘: python中,每个py文件被称之为模块,每个具有__init__.py文件的目录被称为包。只要模块或者包所在的目录在sys.path中,就可以使用import 模块或import 包来使用。 如果想使用非当前模块中的代码,需要使用Import,这个大家都知道。 如果你要使用的模块(py文件)和当前模块在 同一目录 ,只要import相应的文件名就好,比如在a.py中使用b.py: import b 但是如果要import一个

ImportError: No module named scipy.sparse

放肆的年华 提交于 2019-12-12 19:18:47
问题 I installed Scipy on Ubuntu using the following commands: sudo apt-get install python-scipy pip install scipy but when run import, I get this error: ImportError: No module named scipy.sparse I searched and tried the following and reinstalled Scipy: sudo apt-get purge python-scipy but still got the same error. Update: I didn't import scipy in my python file, just imported keras. Here is the error message: (my_env) .. $ python test.py Using TensorFlow backend. Traceback (most recent call last):

ImportError: cannot import name ModuleA

好久不见. 提交于 2019-12-12 17:58:17
问题 I have the following stacktrace when I try to import ModuleA: Traceback (most recent call last): File "menu.py", line 9, in <module> from tmserver import Module1 File "~/tmserver/Module1.py", line 10, in <module> from tmserver.PackageA import ModuleA File "~/tmserver/Package1/ModuleA.py", line 8, in <module> from tmserver.Package2 import Module2 File "~/tmserver/Package2/Module2.py", line 15, in <module> from tmserver.Package3 import Module3 File "~/tmserver/Package3/Module3.py", line 5, in

“undefined symbol: __xmlStructuredErrorContext” importing etree from lxml

允我心安 提交于 2019-12-12 12:28:46
问题 >>> import lxml >>> from lxml import etree Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: /usr/local/lib/python3.4/site-packages/lxml/etree.cpython-34m.so: undefined symbol: __xmlStructuredErrorContext i do have libxml2 and libxslt, i have tried uninstalling and reinstalling too, it didn't help. lxml version: 3.4.4, python: 3.4.2, OS: RHEL 5.5 Please help resolve this issue Thanks 回答1: Your version of lxml.etree was compiled against a different version of

ImportError: Cannot import site module and its dependencies: No module named site

孤街醉人 提交于 2019-12-12 12:26:39
问题 I am trying to run jython servlets on Windows. I can’t run even the most simple HelloWorld.py. I get the following 500 error: message Servlet.init() for servlet [PyServlet] threw exception ... description Le serveur a rencontré une erreur interne qui l''a empêché de satisfaire la requête. exception javax.servlet.ServletException: Servlet.init() for servlet [PyServlet] threw exception ... cause mère ImportError: Cannot import site module and its dependencies: No module named site Determine if

Cannot import module with Lua, results in attempt to index global 'test' (a nil value)

孤人 提交于 2019-12-12 10:16:22
问题 Without success I have attempted to import my own Lua files into other scripts using the require keyword but whenever I attempt to call any functions contained within the imported module (e.g. "test.lua") I reach the subsequent error: require 'test' test.method(args) ==> yields error: ==> Attempt to index global 'test' (a nil value) I've added the file to the package.path in case this was the issue, but again there was no beginning error indicating that it cannot find the file in Lua's

Zipline import error. No module named zipline.transforms

大城市里の小女人 提交于 2019-12-12 08:58:46
问题 I am not able to import the zipline.transforms module >>> from zipline.transforms import batch_transform Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'zipline.transforms' 回答1: Disclaimer: I'm currently a maintainer of Zipline. I'm guessing the reason you're seeing this error is because that particular module was removed a while back (assuming you're using zipline 1.0.0 or later). If you want to do things similar to transforms you'll need

ImportError: No module named pynotify. While the module is installed

帅比萌擦擦* 提交于 2019-12-12 08:47:33
问题 So this error keeps coming back. Everytime I try to tun the script it returns saying: Traceback (most recent call last): File "cli.py", line 11, in <module> import pynotify ImportError: No module named pynotify The strange thing is, I just installed this plugin. I also restarted command prompt already, even the computer. But nothing, if anyone could help me out here that'd be great! 回答1: Try this: pip install py-notify It worked for me. 回答2: You are most likely looking for pyinotify not