I'm trying to use the python-fitbit package with Python 3.4 to get information from Fitbit (https://github.com/orcasgit/python-fitbit).
Whenever I run it, I get the following error. Right now oauthlib is installed, and I've tried uninstalling and reinstalling it to no avail. Any thoughts would be appreciated.
File "/usr/local/lib/python3.4/dist-packages/fitbit/__init__.py", line 10, in <module>
from .api import Fitbit, FitbitOauth2Client
File "/usr/local/lib/python3.4/dist-packages/fitbit/api.py", line 12, in <module>
from requests_oauthlib import OAuth2, OAuth2Session
File "/usr/local/lib/python3.4/dist-packages/requests_oauthlib/__init__.py", line 1, in <module>
from .oauth1_auth import OAuth1
File "/usr/local/lib/python3.4/dist-packages/requests_oauthlib/oauth1_auth.py", line 6, in <module>
from oauthlib.common import extract_params
ImportError: No module named 'oauthlib'
Where in your file system did you install oauthlib?
Please make sure that oauthlib is in your python path.
In order to check your python path you can execute:
import sys; print sys.path
Related
I try to install dash on a mac OS, and I have the following error when running 'import dash' on a python script:
Traceback (most recent call last):
File "app.py", line 16, in <module>
import dash
File "/Users/manuel/Library/Python/3.9/lib/python/site-packages/dash/__init__.py", line 5, in <module>
from .dash import Dash, no_update # noqa: F401,E402
File "/Users/manuel/Library/Python/3.9/lib/python/site-packages/dash/dash.py", line 17, in <module>
from flask_compress import Compress
File "/Users/manuel/Library/Python/3.9/lib/python/site-packages/flask_compress/__init__.py", line 1, in <module>
from .flask_compress import Compress
File "/Users/manuel/Library/Python/3.9/lib/python/site-packages/flask_compress/flask_compress.py", line 14, in <module>
import brotli
File "/Users/manuel/Library/Python/3.9/lib/python/site-packages/brotli.py", line 8, in <module>
import _brotli
ModuleNotFoundError: No module named '_brotli'
I can't figure it out what is the problem. I use python 3.7. I saw on the internet a similar issue on windows, but not on mac. I would be really grateful if you could help me.
You seem to have a broken installation of the brotli module (missing its native code component _brotli).
Try uninstalling it with pip uninstall brotli, then reinstall it; pip install brotli.
Going forward, I would heavily recommend you learn and use virtualenvs instead of installing everything into your Python's site-packages.
After uninstalling and installing again brotli it worked! Moreover, working in virtual environments is really more appropriate. Thank you a lot, AKX.
I'm trying to import quandl and have downloaded it from Github and unzipped it to C:\Python27\Lib\site-packages\quandl but whenever I run my file "quandltest.py", I get "ImportError: No module named inflection". I then downloaded inflection from Github and saved it to the site-packages folder but still get the following whenever I run the file. I'm using a Python 27 IDLE to import quandl (I get the same error using Pycharm). Anyone have any idea/the same issue?? Thanks! I also do not have access to my command window as it has been disabled by the admin so I cannot pip install.
Traceback (most recent call last):
File "C:/Python27/quandltest.py", line 1, in <module>
import quandl
File "C:\Python27\lib\site-packages\quandl\__init__.py", line 7, in <module>
from .model.database import Database
File "C:\Python27\lib\site-packages\quandl\model\database.py", line 11, in <module>
from quandl.connection import Connection
File "C:\Python27\lib\site-packages\quandl\connection.py", line 5, in <module>
from .util import Util
File "C:\Python27\lib\site-packages\quandl\util.py", line 1, in <module>
from inflection import parameterize
ImportError: No module named inflection
I downloaded the and installed the twitter wrapper for python from:
https://python-twitter.googlecode.com/files/python-twitter-1.1.tar.gz
This is all i have in my code now:
import simplejson
import httplib2
import twitter
This is the error i get:
Traceback (most recent call last):
File "C:\Python27\Scripts\tweets.py", line 3, in <module>
import twitter
File "build\bdist.win-amd64\egg\twitter.py", line 38, in <module>
File "C:\Python27\lib\site-packages\requests_oauthlib-0.4.0-py2.7.egg\requests_oauthlib\__init__.py", line 1, in <module>
from .oauth1_auth import OAuth1
File "C:\Python27\lib\site-packages\requests_oauthlib-0.4.0-py2.7.egg\requests_oauthlib\oauth1_auth.py", line 3, in <module>
from oauthlib.common import extract_params
ImportError: No module named oauthlib.common
Which module can i install to stop this error?
https://github.com/idan/oauthlib
Try to install oauthlib to fix the error.
https://github.com/idan/oauthlib
Try to install oauthlib to fix the
error. answered Oct 11 at 12:32 by xiaowl
The above worked for me. I was installing python-twitter and its dependencies in a web2py application /modules subdirectory and was getting a similar error. I installed oauthlib from the above link and all is happy.
Thanks, Xiaowl.
I have been attempting to follow a tutorial online and I have followed every single line and for some reason I get the following error:
Traceback (most recent call last):
File "C:/Users/User/Desktop/OpenGLContextTest.py", line 2, in <module>
from OpenGLContext import testingcontext
File "C:\Python27\lib\site-packages\openglcontext-2.2.0a2-py2.7.egg\OpenGLContext\testingcontext.py", line 10, in <module>
from OpenGLContext import plugins, context, contextdefinition
File "C:\Python27\lib\site-packages\openglcontext-2.2.0a2-py2.7.egg\OpenGLContext\context.py", line 32, in <module>
from OpenGLContext import visitor, texturecache,plugins
File "C:\Python27\lib\site-packages\openglcontext-2.2.0a2-py2.7.egg\OpenGLContext\visitor.py", line 3, in <module>
from OpenGLContext.scenegraph import nodepath
File "C:\Python27\lib\site-packages\openglcontext-2.2.0a2-py2.7.egg\OpenGLContext\scenegraph\nodepath.py", line 3, in <module>
from vrml.vrml97 import nodepath, nodetypes
File "C:\Python27\lib\site-packages\pyvrml97-2.3.0a2-py2.7.egg\vrml\vrml97\nodepath.py", line 4, in <module>
from vrml import nodepath
File "C:\Python27\lib\site-packages\pyvrml97-2.3.0a2-py2.7.egg\vrml\nodepath.py", line 3, in <module>
from vrml import node, weaklist
File "C:\Python27\lib\site-packages\pyvrml97-2.3.0a2-py2.7.egg\vrml\node.py", line 6, in <module>
from vrml import field, fieldtypes, weaklist, weakkeydictfix
File "C:\Python27\lib\site-packages\pyvrml97-2.3.0a2-py2.7.egg\vrml\field.py", line 2, in <module>
from pydispatch import dispatcher, robustapply
ImportError: No module named pydispatch
I have attempted searching on google for the chance that this tutorial may be broken or something, but I don't believe it is. I have pydispatch and have attempted to install it using easy_install yet nothing changes. Can someone please help me with this? I know the code is completely correct as after a while I copied and pasted everything to ensure that it wasn't my syntax.
The instructions (apparently incorrectly) say to install pydispatcher. I had the same problem you did until I installed the module PyDispatcher. Confusingly, both exist.
To clarify on #Phil's answer.
I saw:
No module named pydispatch
And so I did:
sudo pip install pydispatch
The install worked, but Scrapy still didn't work because we were supposed to:
sudo pip install pydispatcher
You need to install PyDispatcher separately. Please take a look at the required packages for the tutorial to work along with the installation instructions here:
PyOpenGL Introduction
Check particularly within the section named Package Installation
I use Python 3.2.3
Tonight I tried to install requests from http://docs.python-requests.org/en/latest/ by pip and easy_install, but it doesn't work. I have error when trying to import it. So I decided to use standard library urllib.request and see this error again
That is the traceback:
>>> import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "E:\Python32\lib\site-packages\requests-1.2.0-py3.2.egg\requests\__init__.py", line 52, in <module>
from . import utils
File "E:\Python32\lib\site-packages\requests-1.2.0-py3.2.egg\requests\utils.py", line 12, in <module>
import cgi
File "E:\Python32\lib\cgi.py", line 38, in <module>
from email.parser import FeedParser
File "E:\Python32\lib\email\parser.py", line 12, in <module>
from email.feedparser import FeedParser
File "E:\Python32\lib\email\feedparser.py", line 27, in <module>
from email import message
File "E:\Python32\lib\email\message.py", line 17, in <module>
from email import utils
File "E:\Python32\lib\email\utils.py", line 28, in <module>
import socket
File "E:\Python32\lib\socket.py", line 46, in <module>
import _socket
ImportError: Module use of python26.dll conflicts with this version of Python.
So how can I fix this?
UPD: Solved. It was bug in SublimeREPL, reinstalled that package.
I had a similar problem when I was using PythonXY. The Spyder was not loading and it turns out another software OpenCAD had installed Python2.6 version and that was not letting my Python27.dll to not work. After uninstalling OpenCAD, I was able to run the software.
I was able to troubleshoot by first searching for python26.dll and found that this file was located in the OpenCAD folder location and that made me realize that this software was causing the issue.