Forums

Installing TDA-API

I have an app that has been running locally that uses this API client https://tda-api.readthedocs.io/en/latest/index.html. I want to move it to the cloud, but am having trouble installing it here. Per the "getting started" page linked above, I begin with the following, which seems to work...

pip install virtualenv virtualenv -v my-venv source my-venv/bin/activate

I then try to install this specific package with the command pip install tda-api

but receive the error below. Any help would be much appreciated, and I assume this is something basic as I am clueless on how to do things in the cloud, or perhaps just generally!

my-venv) 16:51 ~/Trading Bot $ pip install tda-api DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-suppor t pip 21.0 will remove support for this functionality. Looking in links: /usr/share/pip-wheels ERROR: Could not find a version that satisfies the requirement tda-api (from versions: none) ERROR: No matching distribution found for tda-api

That looks like it's not available for Python 2.7. Create your virtualenv with a version of Python where that library is available:

mkvirtualenv --python python3.6 venv_name

Use whichever version is appropriate.

I think that worked. Thanks!

Now I am just having the problem that after installing it, and running the program, I keep getting a message that TDA is not found. Do I need to tell it something other than Import TDA because it is in the cloud? This works fine on my local machine...

Do you run your code in venv that you created?