Cannot find tweepy module after installing it on Windows - python

I installed tweepy by first cloning it:
git clone git://github.com/tweepy/tweepy.git
Copying tweepy-2.2-py2.7.egg into C:\Python27\Lib\site-packages.
Then installing it from the tweepy directory with:
python setup.py install
The final line of the installation process states:
Installed c:\users\linus\appdata\local\enthought\canopy32\user\lib\site-packages\tweepy-2.2-py2.7.egg
Processing dependencies for tweepy==2.2
Finished processing dependencies for tweepy==2.2
However, I still receive the error:
Traceback (most recent call last):
File "C:\Users\Linus\Documents\GitHub\Toxic\src\main.py", line 3, in <module>
from api.Twitter import Twitter
File "C:\Users\Linus\Documents\GitHub\Toxic\src\api\Twitter.py", line 1, in <module>
import time,tweepy,sys,json
ImportError: No module named tweepy

Related

ImportError: No module named api_core.exceptions

I wanted to run a google.cloud.storage dependency to my project so I tried to install this dependency with
sudo pip install --upgrade google-api-python-client
Running the above command, we installed all the required packages in the apache airflow dist-packages directory ex:- /usr/local/python2.7/dist-packages/
When i imported libraries into my project using the below code.
from airflow.contrib.operators.mysql_to_gcs import MySqlToGoogleCloudStorageOperator
running the project on Python, i am getting the error ImportError: No module named api_core.exceptions
here is the trace
#python mysql_to_gcs.py
[2019-04-30 06:45:09,668] {settings.py:182} INFO - settings.configure_orm(): Using pool settings. pool_size=5, pool_recycle=1800, pid=15440
Traceback (most recent call last):
File "mysql_to_gcs.py", line 2, in <module>
from airflow.contrib.operators.mysql_to_gcs import MySqlToGoogleCloudStorageOperator
File "/usr/local/lib/python2.7/dist-packages/airflow/contrib/operators/mysql_to_gcs.py", line 25, in <module>
from airflow.contrib.hooks.gcs_hook import GoogleCloudStorageHook
File "/usr/local/lib/python2.7/dist-packages/airflow/contrib/hooks/gcs_hook.py", line 25, in <module>
from airflow.contrib.hooks.gcp_api_base_hook import GoogleCloudBaseHook
File "/usr/local/lib/python2.7/dist-packages/airflow/contrib/hooks/gcp_api_base_hook.py", line 30, in <module>
from google.api_core.exceptions import GoogleAPICallError, AlreadyExists, RetryError
ImportError: No module named api_core.exceptions
Instead of --upgrade google-api-python-client Just reinstall api-core using
pip install dialogflow
Upgrade has some weird problems which does not update api-core.

IB API not installing properly on Mac

So I'm trying to use the IB API wrapper from here and I try running the first line
from ib_insync import *
but am getting the following error:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/ib_insync/__init__.py", line 10, in <module>
import ibapi
ModuleNotFoundError: No module named 'ibapi'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/ib_insync/__init__.py", line 13, in <module>
'IB API from http://interactivebrokers.github.io is required')
RuntimeError: IB API from http://interactivebrokers.github.io is required
but I've downloaded the IB API from the IB github (had to use The Unarchiver to unzip) and saved it on my desktop. As far as I can tell there's no pip3 command I can use to install it so I'm not sure what else I can do to install the IB API. I've allowed ticked all the boxes for the API in TWS. I'm not sure why it's not installing properly?
It seems to be the same issue found here but mine is for macosx. I've tried running the commands from README.md and they don't work. It just says no such directory exists.
Installing the a python module as a wheel is optional- its also possible to just include the path to the module in the PYTHONPATH environment variable. But if you're using the commands from the READ.ME to build and install a wheel, make sure you're in the pythonclient folder and then run:
python3 setup.py bdist_wheel
python3 -m pip install --user --upgrade dist/ibapi-9.75.1-py3-none-any.whl
Thats for the current API Latest version as of March 2019 which is 975.1

getting this error while loading a tensorflow project

getting a error while a installing a tensorflow python project from https://github.com/victordibia/skyfall
first i tried to install the requiremnt.txt file i got Could not detect requirement name for 'git+https://github.com/dpallot/simple-websocket-server.git', please specify one with #egg=your_package_name error,
then i removed the last line of txt file, then getting this
Traceback (most recent call last):
File "app.py", line 18, in
from utils import web_socket_server
File "C:\Users\anurag\Downloads\skyfall-master\utils\web_socket_server.py", line 4, in
from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket
ModuleNotFoundError: No module named 'SimpleWebSocketServer'
after that i installed git , now getting this
Traceback (most recent call last):
File "app.py", line 19, in
from utils import web_socket_client
File "C:\Users\anurag\Downloads\skyfall-master\utils\web_socket_client.py", line 8, in
from websocket import WebSocketException, WebSocketConnectionClosedException
ImportError: cannot import name 'WebSocketException'
The error means that you have not installed this package: https://github.com/dpallot/simple-websocket-server
Try this to install it(you must have pip installed and also git) and then run the project again:
python -m pip install git+https://github.com/dpallot/simple-websocket-server.git

Can't find submodule in package

I'm using Anaconda3 version 4.2.0 on ubuntu (in docker).
Anaconda is installed in /root/anaconda3 folder.
I installed theano_bpr package using pip install theano_bpr.
Now when i open python and try import theano_bpr, i get the following message:
>>> import theano_bpr
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/anaconda3/lib/python3.5/site-packages/theano_bpr/__init__.py", line 17, in <module>
from bpr import BPR
ImportError: No module named 'bpr'
However, when i navigate to /root/anaconda3/lib/python3.5/site-packages/theano_bpr/ and run python there, i'm able to import theano_bpr.
In /root/anaconda3/lib/python3.5/site-packages/theano_bpr/ there are following files:
__init__.py, bpr.py (this one is causing problems), t.py, and utils.py.

python + how to install the module web.py

I installed on my XP machine the python version - 3.4.0
and now I want to install the web.py module
the installation is failed on print "var", var
I guess is because the missing "(" , ")"
but how to fix that?
C:\Python34\Scripts>pip install web.py
Downloading/unpacking web.py
Running setup.py (path:D:\DOCUME~1\uba\LOCALS~1\Temp\pip_build_uba\web.p
y\setup.py) egg_info for package web.py
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "D:\DOCUME~1\ubarih\LOCALS~1\Temp\pip_build_uba\web.py\setup.py",
line 6, in <module>
from web import __version__
File "D:\DOCUME~1\uba\LOCALS~1\Temp\pip_build_uba\web.py\web\__init_
_.py", line 14, in <module>
import utils, db, net, wsgi, http, webapi, httpserver, debugerror
File "C:\Python34\lib\site-packages\db\__init__.py", line 69
print "var", var
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "D:\DOCUME~1\uba\LOCALS~1\Temp\pip_build_uba\web.py\setup.py", line
6, in <module>
from web import __version__
File "D:\DOCUME~1\ubarih\LOCALS~1\Temp\pip_build_uba\web.py\web\__init__.py
", line 14, in <module>
import utils, db, net, wsgi, http, webapi, httpserver, debugerror
File "C:\Python34\lib\site-packages\db\__init__.py", line 69
print "var", var
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
You installed Python 3.4 on your machine, but web.py does not support Python3.X.
If you look at the source, you see that there is a branch in the git, but the migration seemed to be incomplete. (https://github.com/webpy/webpy/tree/python3/web).
There was also a discussion about the migration (https://groups.google.com/forum/#!topic/webpy/NvDqKEEEMEI).
Install the development branch
You can try this branch by downloading the source from github
(https://github.com/webpy/webpy/archive/python3.zip). After you downloaded the file, extract it and run the setup-script
setup.py install
from a python command prompt (assuming you are on Windows).
But there is no guarantee that this version will work as expected.
As an (easier?) alternative:
If you want to use web.py, try to install python 2.7.x (https://www.python.org/downloads/release/python-2710/) and install web.py via pip afterwards.

Categories

Resources