|"ImportError: No module named xlsxwriter" while converting python script to .exe|
ive only used cx_freeze a few times and was successful using these steps
(you were possibly missing something in this):
first create a setup.py
from cx_Freeze import setup, Executable
exe = Executable(
name = "desiredname",
version = "1",
description = "example program",
executables = [exe]
before running this make sure that you have all non default(built in)
modules and the setup.py in the same folder as the "yourmodule.py" then
from the command line run "python setup.py build"
|While Sending Html Mails from my web application Recieved Mails contains Symbols like &ldquo,&rdquo, ‘|
Check with another constructor for htmlView:
ContentType mimeType = new System.Net.Mime.ContentType("text/html");
var htmlView = AlternateView.CreateAlternateViewFromString(bodyMessage,
|Python ImportError: No module named cv|
It needs this package to function
|Python on OS X: ImportError: No module named fsevents|
I think you have not installed fsevents, you can download fsevents from
extract the repository and cd into and do python setup.py install.
|Python ImportError: No module named 'xxxx'|
You need to use either explicit relative or absolute imports when you use
from wordpress_xmlrpc import base
from . import base
In python3 import base would only import an absolute package base, as
implicit relative imports are no longer supported.
|Python 2.7 - ImportError: No module named Image|
Try to put the python(2.7) at your Windows path.
Do the following steps:
Open System Properties (Win+Pause) or My Computer and right-click then
Switch to the Advanced tab
Click Environment Variables
Select PATH in the System variables section
Add python's path to the end of the list (the paths are separated by
|python ImportError "module named termios" on GAE|
It looks like there are a number of pyimgur libraries available. I would
make sure that you are using the correct one.
It looks like you are trying to use this library based on the other
dependencies you have installed (decorator, oauth2, requests)
However, there is no auth module in that library, so line 28 of your
uploadimage.py file doesn't make any sense because there is no auth to
from pyimgur import auth
Try out the library I linked instead.
|ImportError: No module named transport (Paramiko, Python 3.2.5)|
It appears Paramiko is trying a relative import, which is not recognised in
this form in Python 3 anymore. See the changes in Python 3.
The import statements in Paramiko should be one of
from .transport import SecurityOptions, Transport
(note the leading dot), or
from paramiko.transport import SecurityOptions, Transport
You can either fix the paramiko source code, or as a workaround, you could
to your PYTHONPATH. Neither are preferred.
Did you run the 2to3 tool before you ran python3 setup.py install? I'm not
sure if that would fix this though, since the tool probably can't
distinguish between a relative or absolute import in the way it is used
Do check on the Paramiko forums (if there
|Python 2.6 on MacOSX - ImportError: No module named _collections|
Django is attempting to issue the following command (or some variant of
And is failing. This could be because your installation is missing
components . You can verify it's not a django related issue by doing the
Pythoness-410:auth gfleche$ python
>>> import collections
If you get an error back, then it's likely to be an issue with your python
installation - since collections has been around for some time, and is part
of the standard install.
|ImportError: No module named bs4 because in wrong python folder|
Look, I suggest you download first the package of BeautifulSoup from its
source in https://pypi.python.org/pypi/BeautifulSoup, once this has
completed go to the folder where you download the compressed file ,
decompress the file and then inside you will see a python file named
setup.py. This is the install file of the package, you need to run a
command prompt in the folder and execute teh following line :
python setup.py install
This is another way of install Python packages without pip.
|ImportError: No module named ' ' while Import class in the __init__.py file Python|
You are using Python 3. Do
from .Courses import Courses
from .Fridge import Fridge
Python 2 would look for Courses module in the same dir, but Python 3 looks
for Courses module in site packages - and, obviously, it's not there.
P.S. "Phython" - sounds interesting ;)
|GAE Python bulk uploader is giving error: "ImportError: No module named model"|
Well, I think I found the answer, but it doesn't look like I'm going to be
able to use the bulk uploader anyways since my objects use ndb.
See these answers:
bulkloader not importing ndb.model
dowload app engine ndb entities via bulk exporter / bulk uploader
|ImportError: Could not import settings 'company.foo.settings' (Is it on sys.path?): No module named foo.settings|
Have you tried setting the DJANGO_SETTINGS_MODULE environment variable to
From the Djanjo Documentation;
When you use Django, you have to tell it which settings you’re using.
Do this by using an environment variable, DJANGO_SETTINGS_MODULE.
The value of DJANGO_SETTINGS_MODULE should be in Python path syntax, e.g.
mysite.settings. Note that the settings module should be on the Python
import search path.
Can you also add the following to the top of your manage.py file?
In response to your clarification, you can try relative imports:
|Installed python-docx package yet get the ImportError: No module named docx|
Try setting your PYTHONPATH environment variable.
If you need to find where pip is, you could try the locate command if
you're on Linux.
|ImportError: No module named pip|
I ran into this same issue when I attempted to install the nova client.
spencers-macbook-pro:python-novaclient root# python setup.py install
/usr/bin/python: No module named pip
error: /usr/bin/python -m pip.__init__ install 'pbr>=0.5.21,<1.0'
'iso8601>=0.1.4' 'PrettyTable>=0.6,<0.8' 'requests>=1.1'
'simplejson>=2.0.9' 'six' 'Babel>=0.9.6' returned 1
I use homebrew so I worked around the issue with sudo easy_install pip
spencers-macbook-pro:python-novaclient root# brew search pip
aespipe brew-pip lesspipe pipebench pipemeter spiped
If you meant "pip" precisely:
Homebrew provides pip via: `brew install python`. However you will then
have two Pythons installed on your Mac, so alternatively you can:
|ImportError: No module named _____|
You are already within the myapp module by being in the myapp folder.
Therefore, you do not need to use the import myapp.modu1 syntax and instead
should use import modu1.
obj = modu1.TestMod1Class()
obj.msg() # output: Hello World!
Note: I tested in Python 3 because I don't have 2 on my machine, but it
should be the same (I did edit modu1 to use the new print syntax).
|Import uno ImportError: no module named uno bug|
Python should import uno module so you should import it form openoffice.org
package by typing the following command
Then the uno module is imported from openoffice.org(if you dont specify the
path it will take the default python without uno module)
|ImportError: No module named 'pygame'|
I was trying to figure this out for at least an hour. And you're right the
problem is that the installation files are all for 32 bit.
Luckily I found a link to the 64 pygame download! Here it is:
Just pick the corresponding version according to your python version and it
should work like magic. The installation feature will bring you to a
bright-blue screen as the installation (at this point you know that the
installation is correct for you.
Then go into the Python IDLE and type "import pygame" and you should not
get any more errors.
Props go to @yuvi who shared the link with StackOverflow.
|ImportError: No module named requests|
Requests is not a built in module, so you will have to download it. You can
get it here: https://pypi.python.org/pypi/requests
Use $ sudo pip install requests if you have pip installed
On OSX you can also use sudo easy_install -U requests if you have
Use > Patheasy_install.exe requests if you have a windows machine,
where easy_install can be found in your Python*Scripts folder, if it was
installed. (Note Patheasy_install.exe is an example, mine is
If you don't have easy install and are running on a windows machine, you
can get it here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#distribute
If you manually want to add a library to a windows machine, you can
download the compressed library, uncompress it,
|ImportError: No module named mechanize|
Have you checked sys.path in the python shell?
>>> import sys
# Returns a list of directories & .egg files
For python to find mechanize, it needs to be in one of the places listed on
sys.path. If you know where mechanize was installed, then you can check
directly whether it's on sys.path (I'm not sure how to find out where it
was installed automagically).
|ImportError - No module named main in GAE|
Have a look at getting started with python27. You mixing CGI and WSGI. You
have to use webapp2 here.
Your WSGI main.py :
self.response.headers['Content-Type'] = 'text/plain'
application = webapp2.WSGIApplication([
See also this blog post about CGI and WSGI :
|ImportError: No module named gi.repository Mac OS X|
Did you use the built Python or the one that home brew installed to
/opt/python/ ? issue which python in your term. Then in python issue import
sys; print sys.path.
|ImportError: No module named base|
Your base module is located in the ui module. Hence
from base import BasePage
from ui.base import BasePage
|ImportError: No module named 'com.android'|
Assuming you have the proper modules installed: They aren't in your system
path. You can check your system path manually to see if the directory is
there by doing
You can append to sys.path as you would any list, but it's probably better
to modify it via your OS, rather than on the fly appending. (which is
temporary, sys.path reverts to its original state after the end of the
script in python)
|ImportError: No module named PyQt4|
It is likely that you are running the python executable from /usr/bin
(Apple version) instead of /usr/loca/bin (Brew version)
You can either
a) check your PATH variable
b) run brew doctor
c) run which python
to check if it is the case.
|Course Builder 1.5.1 'ImportError: No module named html5lib'|
I figured the answer out. The problem is that the html5lib-0.95.zip I was
using had within it a directory called html5lib-0.95. I think coursebuilder
required that all files be in the root path of the zip. Recreating the zip
fixed this for me.
|ImportError: no module named contact.forms|
I had a similar problem with the relative paths in Django Book when I went
through. Normally just check that the forms file is in the same folder as
the folder you are working on. Otherwise try appname.contact.forms or just
forms. Something like that. If you could post the file branching of your
project that would help too.
|ImportError: No module named matplotlib.pyplot|
You have 2 pythons installed on your machine, one is the standard python
that comes with MacOSX and the second is the one you installed with ports
(this is the one that has matplotlib installed in it's library, the one
that comes with macosx does not).
Is the standard mac python and since it doesn't have matplotlib you should
always start your script with the one installed with ports.
If python your_script.py works then change the #! to:
Or put the full path to the python interpreter that has the matplotlib
installed in it's library.
|ImportError Exception Value: No module named forms|
Check the exception value and location:
Exception Type: ImportError
No module named forms
Exception Location: /home/chad/newssite/links/views.py in
<module>, line 3
Line 3 of your views.py tries to import from forms.py which should be in
the same directory as your views.py. Make sure your forms.py file is in the
same directory or else import it from where it actually lives.
|ImportError: no module named mako.template|
Do you have template.py inside your .env/lib/python2.6/site-packages/mako
Are you using virtualenv, or have installed mako in
Please paste an output of pip freeze
Have you checked if there is no CR/LF or wrong character on this import
What is the encoding of your foobar.py file?
file -I foobar.py
it should contain utf-8 or ascii
|ImportError: No module named twisted.internet|
I figured out why this error was happening. For some reason, using apt-get
to install a python package was not installing it right.
So, I had to download a tar ball and install the package from them.
I downloaded Twisted tar from here.
I did a tar xjf Twisted-13.1.0.tar.bz2 - this created a directory called
next, cd Twisted-13.1.0
Finally, python setup.py install
This gave me an error. Twisted required another package called
zope.interface. So, I downloaded tar ball for zope.interface from here.
Then, ran this command tar xzf zope.interface-3.6.1.tar.gz That created a
folder called zope.interface-3.6.1. So, cd into zope.interface-3.6.1 and
run python setup.py install
Note: Depending on your user's rights, you may want to do these commands
in sudo mode. Just add
|Vim startup with ImportError: No module named UltiSnips|
Patch 7.3.1163 has introduced additional search paths for Python scripts
(to make writing Python-based plugins easier). Apparently, this has
introduced a regression with some existing plugins. See this discussion on
If you're compiling Vim from the Mercurial repository, revert to a version
before patch 7.3.1163 (with hg update REV), and stay there until the issue
is resolved in a future patch.
|Why am I getting "ImportError: No module named pyramid.config"|
I found the answer to my problem. My virtual environment was correctly set
up, I just needed to run my code through the version of python found in the
scripts folder of my virtual environment.
The python file you are trying to run can be found anywhere on your local
machine as long as it uses python from that environment, for example
C:anypathonlocalmachine> C:envScriptspython.exe helloworld.py
I was making the mistake of putting my python file in the virtual
environment and attempting to run the following WRONG code
I thought that I was supposed to be working entirely within the virtual
Thanks for the help in the comments rebelious
|Django - ImportError: No module named city|
Put your city (files which you want to import) in root dir of main
If IDE(PyCharm for an example) wont worry about import this module - than
the problem was in paths.
I've smashed with this problem at once. And the problem paths were.
|ImportError: No module named qgis.core|
If you have pip installed you could either try pip search qgis or pip
freeze. The latter shows a list of all installed python packages to check
if you have the package. Maybe try reinstalling qgis ...
|ImportError: No module named apiclient.discovery|
apiclient is not in the list of third party library supplied by the
You need to copy apiclient into your project directory & you need to
copy these uritemplate & httplib2 too.
Note: Any third party library that are not supplied in the documentation
list must copy to your appengine project directory
|ImportError: No module named httplib2 App engine 1.8.0|
httplib2 is not part of python or core third partly libraries supplied by
the appengine runtime - see
You need include or link the httplib2 code directly in your project and
deploy it with your project.
|ImportError: No module named django.core.mail|
Probably your PYTHONPATH variable is not set correctly. Start django like
and try this command:
If this raises an error, you need to set your PYTHONPATH environment
variable in a way that it contains the path to your django directory.
|django | gunicorn | ImportError: No module named _ssl|
I assume that you are using a Linux distro since you compiled python from
source. You need at least 2 SSL library: openssl and openssl-devel
With Ubuntu: apt-get install openssl openssl-devel
With Redhat based: yum install openssl openssl-devel
To build from source, you can download from: openssl and openssl-devel
Hope it helps.
|Biopython installation issues: "ImportError: No module named bio"|
I don't know much about python on windows, but you can try to give the full
path of the library using the method described here. I'll paste that user's
code so the answer can be complete:
foo = imp.load_source('module.name', 'C:Python27Lib')
On windows, the default path should be something like:
although if it was, you wouldn't have this issue (also not sure about the
Backup solution (from same previous link)...
# the mock-0.3.1 dir contains testcase.py, testutils.py & mock.py