importerror

ImportError: No module named httplib2

旧街凉风 提交于 2019-12-05 04:23:52
I have a Python 2.7 GAE app that already has a lot of functionality. Now I want to integrate with a Google API. Within my IDE (PyCharm) running on Mac OSX, I added the following lines to my app's main program: import httplib2 pass When I COMMAND-click "httplib2", the IDE opens "httplib2-0.8-py2.7.egg/httplib2/ init.py " in an editor panel, so the IDE apparently knows where httplib2 is. But running the app, I get the error shown in the title. To test further, I put breakpoints on both statements shown above and then run the app in debug mode. When it gets to the import statement, I immediately

ImportError: No module named connector.conversion

三世轮回 提交于 2019-12-05 03:28:11
I'm very new to mySQL and just installed it on my Mac (OS 10.6.8). When I try to connect with the database through Terminal, I get this message: Last login: Tue Jun 17 10:42:23 on console mysqluc -e "help utilities" GEdit-2:~ Eric$ mysqluc -e "help utilities" Traceback (most recent call last): File "/bin/mysqluc", line 23, in from mysql.utilities.common.options import license_callback, UtilitiesParser File "/Library/Python/2.6/site-packages/mysql/utilities/common/options.py", line 35, in from mysql.connector.conversion import MySQLConverter ImportError: No module named connector.conversion

ImportError when using rpy2 with numpy.testing

痞子三分冷 提交于 2019-12-05 02:44:29
问题 I've run into a rather strange error when doing unit testing with the numpy.testing module. I'm running an iPython notebook in a VM. In my code, I have one test where I compare my output to that in R. This requires me to load the rpy2 modules like so: import rpy2.robjects as robjects from rpy2.robjects.packages import importr fastclime = importr('fastclime') grdevices = importr('grDevices') However when I run ! py.test , I get the following error: ==================================== ERRORS =

Heroku Python/Django applications all simultaneously developed ImportError

限于喜欢 提交于 2019-12-05 01:42:49
Today all my Python/Django applications on Heroku stopped working. The logs for all of them show the same issue. When trying to restart/build, the error log is as shown below. I have tried rebuilding the projects in a new local virtual environment, and they work fine locally. However, when pushing them to Heroku, they encounter this ImportError and refuse to deploy. Similarly, when I try to restart the existing applications, I see the same error logged prior to the instance crashing. Please let me know if there is any other information I can provide. Error log: 2014-06-03T22:30:05.293788+00:00

Python: is the current directory automatically included in path?

时光怂恿深爱的人放手 提交于 2019-12-05 01:28:03
Python 3.4: From reading some other SO questions it seems that if a moduleName.py file is outside of your current directory, if you want to import it you must add it to the path with sys.path.insert(0, '/path/to/application/app/folder') , otherwise an import moduelName statement results in this error: ImportError: No module named moduleName Does this imply that python automatically adds all other .py files in the same directory to the path? What's going on underneath the surface that allows you to import local files without appending the Python's path? And what does an __init__.py file do

How to catch an ImportError non-recursively?

倖福魔咒の 提交于 2019-12-05 01:22:13
问题 Say we want to import a script named user.py , which may fail. try: import user except ImportError: logging.info('No user script loaded.') How can we make sure to only catch the possible import failure of user.py itself, and not of the imports that may be contained in user.py ? 回答1: You could check to see if the current traceback is part of a chain of tracebacks: import sys try: import user except ImportError: if sys.exc_info()[2].tb_next: raise logging.info('No user script loaded.') If there

Why did reinstalling Silverlight break my Import configuration?

断了今生、忘了曾经 提交于 2019-12-05 01:16:40
Based on the answer here: Which, if any, recent Windows updates should I uninstall to revivify Silverlight or rectify other problems? , I uninstalled / reinstalled Silverlight and rebooted. Now, though, I get a compilation error, namely: "The imported project "C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk." It points to this line in a *.csproj file: <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft

ImportError: No module named suds

依然范特西╮ 提交于 2019-12-05 01:05:33
问题 Having trouble with py2exe importing the suds module, and narrowed it down to the following: >>> imp.find_module('suds', sys.path) Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named suds However, a simple import works fine: >>> import suds >>> suds.__version__ '0.4' Here is my sys.path, which shows suds at 'C:\Python27\lib\site-packages\suds-0.4-py2.7.egg': >>> pprint.pprint(sys.path) ['', 'C:\\Python27\\lib\\site-packages\\pyyaml-3.10-py2.7

Default pip installation of Dask gives “ImportError: No module named toolz”

依然范特西╮ 提交于 2019-12-05 01:01:39
I installed Dask using pip like this: pip install dask and when I try to do import dask.dataframe as dd I get the following error message: >>> import dask.dataframe as dd Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/path/to/venv/lib/python2.7/site-packages/dask/__init__.py", line 5, in <module> from .async import get_sync as get File "/path/to/venv/lib/python2.7/site-packages/dask/async.py", line 120, in <module> from toolz import identity ImportError: No module named toolz No module named toolz I noticed that the documentation states pip install dask : Install

ImportError: No Module named xlwt

非 Y 不嫁゛ 提交于 2019-12-05 00:17:10
My sytem: Windows, Python 2.7 I downloaded a package and want to include it in my script. After I unzipped the package, here is my folder structure: Work xlwt-0.7.3 (contains a setup.py ) xlwt (contains __init__.py among others) My script runs from the top-level (Work) folder. Using import xlwt in my script produces: ImportError: No Module named xlwt How do I import xlwt? First off, try using easy_install or pip to install it into your pythonpath: easy_install xlwt or pip install xlwt These are python package managers/installers and make the whole process so much easier. But if you have