I installed this library called Polygon, in Python 2.7.3. But, each time I import it I get the next error message :
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "Polygon/__init__.py", line 5, in <module>
from Polygon.cPolygon import *
ImportError: No module named cPolygon
I have no idea about what could be going wrong. And also, I have already tried to contact the original author of this on his personal webpage.
but he hasn't replied though :( I wonder if someone can help me with this issue please.
It sounds like you didn't in fact install it, but instead just copied it to your working directory. As always, run setup.py with the appropriate arguments to install.
This error can happen if you try to run python from inside the directory you used to install Polygon. Move to a different directory and try again.
Related
>>> import yaml
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tools/python_libs/yaml/__init__.py", line 2, in <module>
from error import *
ModuleNotFoundError: No module named 'error'
I don't see how to set my PYTHONPATH with anaconda3.
Am I missing an install step?
I have the same situation, but with the ROS. The same error reproduces when you use python 3 instead of python 2. You can see corresponding discussion
here. For some reasons I would like to use python3 instead of python2, so I need to find out, how to get rid of this error.
I can suggest two solutions right now:
Either use python2 instead of python3, as suggested in ROS discussion
Or try to install yaml with pip3 for python3 (not pip). I think it may help in this situation. See here for installation instructions.
I am trying to use PyOsmium but it will not import. python3 setup.py install appears to complete just fine but when I import osmium I get the error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/dylan/Downloads/osmium/osmium/__init__.py", line 1, in <module>
from ._osmium import *
ImportError: No module named 'osmium._osmium'
I have no idea what's causing this and it's my first time manually installing a C++ wrapper. I have the top-level PyOsmium and libosmium directories in the same directory. Is it trying to import the C++ files?
Any help would be much appreciated.
I had the same problem. The solution, as provided by one of the maintainers, is very easy:
Are you in the pyosmium root directory while trying the import? Change the directory to somewhere else and try again. In the root directory the local osmium source directory takes precedence over your freshly installed version.
Change to a different directory from the one you compiled in and it should work; it did for me.
I downloaded this library: https://github.com/bufferapp/buffer-python
Ran the setup.py install, and then tried to run some code using the newly installed library.
What happens though is I get this error:
Traceback (most recent call last):
File "twitter-quote-bot.py", line 14, in <module>
from buffpy.managers.profiles import Profiles
ImportError: No module named managers.profiles
The only way I've found to fix it is to move my program (twitter-quote-bot) into the downloaded folder from Buffer and run it there.
Did I do something wrong in the installation? It seems like I should be able to do these imports globally.
Thanks in advance!
I have problems installing d3py.
easy_install from https://github.com/mikedewar/d3py/tarball/master says it's all ok, cloning the repo and setup.py'ing say it's all ok as well, Pandas an Numpy works great (I also use Networkxs working good as well), bu when I try to import d3py come this Error:
Traceback (most recent call last):
File "C:\Documents and Settings\whoauser\Desktop\python\sofia\sofia.py", line 2, in <module>
import d3py
File "C:\Python34\lib\site-packages\d3py-0.2.3-py3.4.egg\d3py\__init__.py", line 1, in <module>
ImportError: No module named 'pandas_figure'
Is this a bug in the installation script? Where I can find a working egg?
Do anyone had the same problem?
Thanks
I think you need to install the pandas module for python. Have you done that?
Hey Guys I know this has been asked before, and even various times, but I can't really figure out the exact problem with regards to my issue, even after looking at the other import errors.
It's a really basic question, so sorry for that...
I'm writing a program, we'll call it "X.py". I need to import from another file, named graphics.py so my first line of code says:
from graphics.py import *
I'm pretty sure the rest of my code is right, but when I run the program it gives me the error saying
Traceback (most recent call last):
File "/Users/me/Desktop/X.py", line 1, in <module>
from graphics import *
ImportError: No module named 'graphics'
Now I clearly have this file downloaded and I put them in a folder called Project X, together.
Any idea how I can get this program to see the other file I guess?
Thanks in advance!
Drop the .py
Instead, use:
from graphics import *
You have to download this file and put it in the same folder with your script.
From the docstring:
INSTALLATION: Put this file somewhere where Python can see it.