Hi I am trying to download PyUserInput, I downloaded it using pip and there were no errors. When I try to import it into a file in give me an error which I do not understand. I have a basic understanding of python and pip.Any help will be much appreciated.I have pasted the error I get below.
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from pymouse import PyMouse
File "/usr/local/lib/python2.7/dist-packages/pymouse/__init__.py", line 41, in <module>
from .x11 import PyMouse, PyMouseEvent
File "/usr/local/lib/python2.7/dist-packages/pymouse/x11.py", line 16, in <module>
from Xlib.display import Display
File "/usr/local/lib/python2.7/dist-packages/Xlib/display.py", line 26, in <module>
from six import create_unbound_method
ImportError: cannot import name create_unbound_method
Thanks
I had the same problem on old raspberry pi image and upgrading six solved the issue for me:
sudo pip install six --upgrade
Related
I am using Anaconda and trying to install tensorflow with pip, but I receive the following error and I am not sure what to do next?
Traceback (most recent call last):
File "/home/xieyangyang/anaconda3/envs/tensorflow1/bin/pip", line 7, in <module>
from pip._internal import main
File "/home/xieyangyang/anaconda3/envs/tensorflow1/lib/python2.7/site-packages/pip/_internal/__init__.py", line 20, in <module>
from pip._vendor.urllib3.exceptions import DependencyWarning
File "/home/xieyangyang/anaconda3/envs/tensorflow1/lib/python2.7/site-packages/pip/_vendor/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/home/xieyangyang/anaconda3/envs/tensorflow1/lib/python2.7/site-packages/pip/_vendor/urllib3/connectionpool.py", line 44, in <module>
from .util.queue import LifoQueue
ImportError: No module named queue
Maybe just reinstall pip without pip?
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
See https://pip.pypa.io/en/stable/installing/ for more info.
Not able to solve.Kindly clarify.
I had installed georasters then it gave error with numpy ,now numpy is solved it is giving error with fiona.
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import georasters
File "D:\Python\lib\site-packages\georasters\__init__.py", line 3, in <module>
from .georasters import get_geo_info, map_pixel, map_pixel_inv, aggregate, create_geotiff, align_rasters, \
File "D:\Python\lib\site-packages\georasters\georasters.py", line 38, in <module>
from fiona.crs import from_string
File "D:\Python\lib\site-packages\fiona\__init__.py", line 77, in <module>
from fiona.collection import Collection, BytesCollection, vsi_path
File "D:\Python\lib\site-packages\fiona\collection.py", line 7, in <module>
from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: DLL load failed: The specified module could not be found.
Having same issue.
Just install fiona and geopandas.
pip install fiona geopandas
I am new to python and I am trying to work on a project with deep learning and want to use graphlab library. I use sublime text for coding on windows 10. My code is only this line:
import graphlab
I get this error msg:
Traceback (most recent call last):
File "test.py", line 1, in
import graphlab
File "graphlab__init__.py", line 59, in
from graphlab.data_structures.sgraph import Vertex, Edge
File "graphlab\data_structures__init__.py", line 25, in
from . import sframe
File "graphlab\data_structures\sframe.py", line 19, in
from ..connect import main as glconnect
File "graphlab\connect\main.py", line 26, in
from ..cython.cy_unity import UnityGlobalProxy
ImportError: No module named cy_unity
Try using graphlab.get_dependencies() in your interpreter.
I think I made a mistake when installing, i re-installed and it worked fine. Thanks anyway
I am running a brewed Python 2.7.11 on OS X El Capitan 10.11.3. I fail to import Shapely / GEOS:
Failed `CDLL(/usr/local/lib/libgeos_c.dylib)`
Failed `CDLL(/Library/Frameworks/GEOS.framework/Versions/Current/GEOS)`
Failed `CDLL(/opt/local/lib/libgeos_c.dylib)`
Traceback (most recent call last):
File "example.py", line 2, in <module>
from shapely.geometry import Point
File "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/site-packages/shapely/geometry/__init__.py", line 4, in <module>
from .base import CAP_STYLE, JOIN_STYLE
File "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/site-packages/shapely/geometry/base.py", line 9, in <module>
from shapely.coords import CoordinateSequence
File "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/site-packages/shapely/coords.py", line 8, in <module>
from shapely.geos import lgeos
File "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/site-packages/shapely/geos.py", line 92, in <module>
mode=(DEFAULT_MODE | 16))
File "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/site-packages/shapely/geos.py", line 61, in load_dll
libname, fallbacks or []))
OSError: Could not find lib geos_c or load any of its variants ['/Library/Frameworks/GEOS.framework/Versions/Current/GEOS', '/opt/local/lib/libgeos_c.dylib'].
This error is strikingly similar to those reported here:
Python can't import shapely and
OSError geos_c could not be found when Installing Shapely. After implementing all suggestions that "did the trick" for others, I continue to get this error.
I installed geos with brew install geos today. It installed in /usr/local/Cellar/geos/3.5.0.
If I run find / -name "libgeos_c.dylib", I find three versions:
/Library/Frameworks/GEOS.framework/Versions/3/unix/lib/libgeos_c.dylib
/usr/local/Cellar/geos/3.5.0/lib/libgeos_c.dylib
/usr/local/lib/libgeos_c.dylib
Note that the last line is exactly the same path as in the first line of the error. So Python fails to import an existing file? I know it is an alias (to the file in Cellar), but would be surprised if that's the reason.
Also, $DYLD_LIBRARY_PATH and $GEOS_LIBRARY_PATH are empty at startup, but setting them to any of the following does not resolve the problem:
export DYLD_LIBRARY_PATH=/usr/local/lib
export GEOS_LIBRARY_PATH=/usr/local/Cellar/geos/3.5.0
export GEOS_LIBRARY_PATH=/usr/local/Cellar/geos/3.5.0/lib
Any insight will be tremendously welcome! This has taken me more than half of the day already...
I am working through the PYcharm tutorial, which sets up a polling site, as my first Python/Django project. I am new to this so if I am asking silly questions I apologize in advance. In the admin.py file the following import is not working:
from MyDjangoApp.polls.models import Poll, Choice
I have specified the environment variable as I found in other posts to
DJANGO_SETTINGS_MODULE MyDjangoApp.settings
with MyDjangoApp being my project name and MyDjangoApp.settings as the value in the Edit Configurations tab.
I also tried to follow the lightbulb suggestion to install package models but when I do that I get the following error:
Error occurred when installing packages.
The following command was executed:
packaging_tool.py install --build-dir /tmp/pycharm packaging1986982253689628475.tmp
models
The error output of the command:
Downloading/unpacking models
Downloading models-0.9.3.tar.gz
Running setup.py egg_info for package models
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/tmp/pycharm-packaging1986982253689628475.tmp/models/setup.py", line 25, in
<module>
import models
File "models/__init__.py", line 24, in <module>
from props import *
File "models/props.py", line 23, in <module>
import yaml
ImportError: No module named yaml
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/tmp/pycharm-packaging1986982253689628475.tmp/models/setup.py", line 25, in
<module>
import models
File "models/__init__.py", line 24, in <module>
from props import *
File "models/props.py", line 23, in <module>
import yaml
ImportError: No module named yaml
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pycharm
-packaging1986982253689628475.tmp/models
Storing complete log in /home/andrew/.pip/pip.log
I am not sure how to proceed. I have seen a decent amount of suggestions but they either don't work or I'm not doing it correctly. If anyone has any suggestions I would greatly appreciate it. I have been banging my head against this wall most of the day today and I would really like to be able to move forward. Thanks is advance for anyone willing to help out a newbie.
In polls/admin.py do from models import Poll, Choice - this is presuming you have a models.py file next to admin.py.