I am trying to simply connect to the ibapi (Interactive Brokers API), but I am having some technical troubles with Flask - api

I am trying to simply connect to the ibapi (Interactive Brokers API), but I am having some technical troubles with Python 3.7 .
What I did so far:
I installed the latest version for Windows 10 of the API
I ran C:\TWS API\source\pythonclient and run python setup.py install
I got:
ModuleNotFoundError: No module named 'ibapi'
when I try to import it
What I am doing wrong here and how can I fix this simple error?
My flask project is created in a virtual env named Ibconnect ( (IBconnect) C:\Users\Admin\dev\IBconnect> on the command Windows ) and I think that I have to install the python client here but I don't know how to do it.

Please try to use Anaconda - Spyder. In Anaconda prompt (just activates the conda environment) and navigate to the dir C:\TWS API\source\pythonclient and run python setup.py install

Related

Tensorflow-Text in Miniconda

I am trying to install tensorflow-text through miniconda in Spyder. I have managed to install other modules in Spyder such as tensorflow itself, pandas, scikit-learn, etc. However, using the same command as all the other installations (with the specific package name replaced by tensorflow-text)
conda install spyder-kernels tensorflow-text -y
I continue to get the same error whenever I try to install tensorflow-text:
PackagesNotFoundError: The following packages are not available from current channels:
- tensorflow-text
followed by a suggestion to search for the package on anaconda.org. As such, I searched for the tensorflow-text package on the anaconda site and found one, albeit for linux, by rocketce. Attempting to run the commands listed under the tensorflow-text installation instructions on that webpage also yielded the same error.
At first, I tried to install tensorflow-text through pip and was able to successfully run the command
pip install -U tensorflow-text==2.10.0
which seemed to install tensorflow-text. But I could not figure out how to access it or if it was correctly installed. Specifically, I am looking to use tensorflow-text in the Spyder IDE. I was able to get tensorflow working in the IDE, but not the specific tensorflow-text.
I am using a Windows 10 system; I could not find anything on the anaconda site for Windows 10. I am rather inexperienced (if you could not already tell from the nature and description of the problem), so patience and clear explanations are appreciated. Thanks in advance!

pymysql no module problem on mac os (conda install solution didn't work)

I'm a mac os user (and also a programming beginner )
I installed pymysql package via pip but got an error message from jupyter notebook saying (no module found : pymysql)
After, searching through the link below
(ModuleNotFoundError - PyMySQL for python 3) I assumed that the problem was that I installed the package via pip while using conda.
so after reinstalling it via conda I got the message below from the terminal.
'Collecting package metadata (current_repodata.json): done
Solving environment: done
All requested packages already installed.'
However, when I tried to run the codes again with hopes, got the same message again (no module pymysql found). Now I'm a bit lost. What else can I try to fix no module pymysql problem ?

RASA : ModuleNotFoundError: No module named 'wikipedia'

I'm learning to use rasa language. To diversify the answers of the goal I decided to use the Wikipedia api. To create my working environment I used anaconda with the following commands:
conda create --name rasaWiki python == 3.7.6
conda activate rasaWiki
pip install rasa
pip install wikipedia
In the action.py file, when I try to import 'wikipedia', and launch the server with the command: rasa run actions I get the error:
ModuleNotFoundError: No module named wikipedia
However, I can compile other python programs that use the wikipedia package with the python command python 'nameOfTheFile.py'.
I managed to solve the problem. I work under windows, I use anaconda prompt 3. When I was running the rasa run actions command, I was in the environment (base). The wikipedia package I had installed is in the rasaWiki environment. So I installed Wikipedia with the command pip install wikipedia in the (base) environment, which solved the problem.

Running tensorflow in ipython

tensorflow works using python in a virtualenv I created, but tensorflow doesn't work in the same virtualenv with ipython. This is the error I get:
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name mock was given, but was not able to be found.
I have tried installing ipython within the virtual environment. This is the message I get:
Requirement already satisfied: ipython in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
If I try to uninstall ipython within the virtual environment. I get this message:
Not uninstalling ipython at /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Any ideas on how to get this to work? I don't know how to force the install of ipython to be inside the virtual environment. I've tried deleting the virtual environment and making a new one from scratch, but I get the same error.
I think I figured out the problem. pip was pointing to /Library/Frameworks/Python.framework/Versions/3.4/bin/pip
My ipython was pointing to /opt/local/bin/ipython
I re-installed tensorflow within my virtual environment by calling /opt/local/bin/pip-2.7 install --upgrade tensorflow
Now I can use tensorflow within ipython.

No module named jinja2

Im trying to deploy a Python3.2 app in my Ubuntu 12.04 server. Everything was fine, until I tried to use Jinja2 as my template system.
Im using virtualenv to use Pyhon3.2 instead of Python2, and I've installed other required libraries such as pymongo or bottle without problem. But now, my app fails because it says
ImportError: No module named jinja2
I've installed jinja2 the same way as I installed pymongo or bottle (using pip in the virtualenv), and they work just fine. If I try to install it again:
./virtualenv/bin/pip-3.2 install jinja2
Requirement already satisfied (use --upgrade to upgrade): jinja2 in /var/www/virtualenv/lib/python3.2/site-packages
Cleaning up...
It says that it is installed. I've tried to uninstall and install again with no luck.
Im trying to run the application using mod_wsgi, and I know it's using the right virtualenv, because I don't get any errors due to Pymongo, Bottle, what are installed using the virtualenv pip.
Any ideas? :(
Jijna is not compatible with Python 3.2. See this