Reputation: 2728
This is line2, python code
import tia.analysis.talib_wrapper as talib
Console shows
File "t10.py", line 2, in <module>
import tia.analysis.talib_wrapper as talib
File "/home/jholmes/anaconda3/lib/python3.6/site-packages/tia/analysis/__init__.py", line 2, in <module>
from tia.analysis.model import *
ModuleNotFoundError: No module named 'tia.analysis.model'
Why is module not recognized?I have installed tia with pip install.
Other code from examples makes even more crazy problems.
from tia.bbg import LocalTerminal
import pandas as pd
resp = LocalTerminal.get_reference_data('MSFT US EQUITY', ['PX_LAST', 'GICS_SECTOR_NAME', 'VOLATILITY_30D'])
resp.as_frame()
I got
File "t11.py", line 1, in <module>
from tia.bbg import LocalTerminal
File "/home/jholmes/anaconda3/lib/python3.6/site-packages/tia/bbg/__init__.py", line 1, in <module>
from tia.bbg.v3api import *
File "/home/jholmes/anaconda3/lib/python3.6/site-packages/tia/bbg/v3api.py", line 186
print 'unhandled event: %s' % evt.EventType
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int 'unhandled event: %s' % evt.EventType)?
Just one proof that package is here
pip install tia
Requirement already satisfied: tia in ./anaconda3/lib/python3.6/site-packages
Requirement already satisfied: pandas in ./anaconda3/lib/python3.6/site-packages (from tia)
Requirement already satisfied: numpy in ./anaconda3/lib/python3.6/site-packages (from tia)
Requirement already satisfied: python-dateutil>=2 in ./anaconda3/lib/python3.6/site-packages (from pandas->tia)
Requirement already satisfied: pytz>=2011k in ./anaconda3/lib/python3.6/site-packages (from pandas->tia)
Requirement already satisfied: six>=1.5 in ./anaconda3/lib/python3.6/site-packages (from python-dateutil>=2->pandas->tia)
Upvotes: 1
Views: 1346
Reputation: 4313
tia github page explicitly said that library compatible only with python 2.7. So I guess that is the problem.
Upvotes: 2
Reputation: 3631
Based on the first error it seems that you do not have the package installed but the root cause may be different.
The second error is not crazy. You are trying to use the Python2 library under Python3 which gives you an error. Could you possibly give more information about what you did? What Python version you wanted to run, etc.
If you dive into project specification and README.md page, you can see that dependency is Python2.7
Upvotes: 1