Error running tweepy on QGIS: No module named tweepy - python-2.7

I went through all the previous questions on the subject but could not solve the problem.
I have installed tweepy through pip with no errors but got the error: "No module named tweepy" when I tried importing tweepy in QGIS. I uninstalled and reinstalled in the following directory:
C:\OSGeo4W64\apps\Python27\Scripts and still got the same error.
Than I reinstalled using "pip install tweepy". Now I can see the tweepy folders installed in both directories:
C:\OSGeo4W64\apps\Python27\Scripts and C:\Python27\Lib\site-packages.
I still get the same error.
What may the problem be?

try to pip uninstall tweepy
and then again pip install tweepy
Check if you have tweepy folder here C:\OSGeo4W64\apps\Python27\Lib\site-packages
And in Qgis Python console import tweepy
Checked in Qgis 2.18.3

Related

ImportError: cannot import name OrderedDict; downgrade kombu

I am trying to install and import pytplot, which is a package that can plot IDL save files using python. I have Python 2.7 on Windows 10. If I try importing pytplot, I get an import error saying: ImportError: cannot import name OrderedDict. This question has already been answered here: Getting ImportError: cannot import name OrderedDict.
However, I can't figure out how to complete the first step: downgrade kombu to the 2.5.16 version. I have uninstalled my current version of kombu and I'm trying to use:
"pip install kombu-2.5.16"
This fails and my prompt says that it could not find a version that satisfies this requirement.
Try:
pip install -U kombu==2.5.16
otherwise pip -U kombu==3.5.x
will show you all available versions

invalid syntax error while installed tweepy in anaconda python 2.7

I am very new to python and anaconda. I am trying to install tweepy using pip install command
pip install -i https://pypi.anaconda.org/pypi/simple tweepy
I had referring to this command in
https://anaconda.org/pypi/tweepy
I am getting the below error:
File "<ipython-input-3-57dd52ca9b36>", line 1
pip install -i https://pypi.anaconda.org/pypi/simple tweepy
^
SyntaxError: invalid syntax
Tried a lot searching for this, but could not find one which can solve this problem.
You're supposed to run that in your command shell, not a Python REPL.

How to import psycopg2 when installed - Windows

Can somebody please help me install this psycopg2 which I dont even know what it is. I have no python knowledge, I need this to run a code to connect to read data from txt to postgres.
Problem is, I have installed psycopg2 from exe and but when I run import psycopg2 in python shell I get an error:
import psycopg2
Traceback (most recent call last): File "", line 1, in
import psycopg2 ImportError: No module named psycopg2
i think Psycopg2 is not installed.
please install psycopg2 using pip
like:
pip install psycopg2
once done with this you can import
the pip install in windows doesn't seem to work well and ends up with the error you have mentioned. You can try the binaries provided in StickPeople website. These binaries install without problem and will allow you to access psycopg2. Please check the version of python you have installed with the version of the psycopg2 version. If they don't match up, it'll result in such errors. Even the architecture x86 or x64 matters.
C:\> easy_install psycopg2-2.6.1.win32-py2.7-pg9.4.4-release.exe, you can try this if the binary fails.

Error installing Tweepy for Python (Mac)

I'm working with Python 2.6.6 and have been trying to download tweepy, but whenever I import tweepy in the Python IDLE shell it comes back with a "No module named tweepy" error.
I've downloaded tweepy using
sudo pip install tweepy
And it goes right into /Library/Python/2.7/site-packages with no problems.
Then I cd from that path into tweepy and
python setup.py install
but this error message comes up
/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python: can't open file 'python': [Errno 2] No such file or directory
I've gone through the path and everything is correct with Python at the end.
However, when I open up a Python IDLE shell and
import tweepy
the "No module named tweepy" error comes up.
I'd really appreciate any help!
pip is using Python 2.7, as you can tell from the site-packages path, while you are apparently trying to install for use with 2.6. Leaving aside the question of why you're using 2.6, the problem is easy enough to fix - install pip with Python 2.6.
Download get-pip.py, then (assuming your python command points to version 2.6) run:
sudo python get-pip.py
Once it's installed, you should be able to run
sudo pip2.6 install tweepy
and everything should work properly.

How to install phonenumbers for Django

there!
I am trying to run an imported app on my Ubuntu. But the error message displayed on the screen says No module named phonenumbers
So I tried to install it, by:
sudo easy_install phonenumbers
But again, it throws error, and says ImportError: No module named shortdata
Then I tried to run
sudo easy_install shortdata
This time it gives me:
error: Could not find suitable distribution for Requirement.parse('shortdata')
I cannot figure out how to install 'shortdata'.
What can I do, to make 'phonenumbers' installed?
The issue happening because the module 'shortdata' is get missing while installation. You can correct the issue by installing from source and manually copy the module 'shortdata'.
1)Download source from https://github.com/daviddrysdale/python-phonenumbers
2)Install phonenumbers using setup.py (python setup.py install)
3)Manually copy folder 'shortdata' from python-phonenumbers-dev/python/phonenumbers in source to your installed location(python2.7/site-packages/phonenumbers-5.7b1-py2.7.egg/phonenumbers)