@Supercritical-JoinQuant聚宽
安装后使用get_fundamentals报错,提示:
df = get_fundamentals(q,statDate= statDate)
File "D:\ProgramData\Anaconda3\lib\site-packages\jqdatasdk\utils.py", line 223, in _wrapper
return func(*args, **kwargs)
File "D:\ProgramData\Anaconda3\lib\site-packages\jqdatasdk\api.py", line 70, in get_fundamentals
sql = get_fundamentals_sql(query_object, date, statDate)
File "D:\ProgramData\Anaconda3\lib\site-packages\jqdatasdk\finance_service.py", line 108, in get_fundamentals_sql
trade_day_not_after_stat_date = get_trade_day_not_after(stat_date)
NameError: name 'get_trade_day_not_after' is not defined
请问是什么原因?
python的版本太高了可能会导致下面的问题,3.6.0及其以下可以,之后不确定。报类似的错误的话,降低python版本。
如何获取其他版本的Anacond: http://docs.anaconda.com/anaconda/faq/#id4
```
How do I get Anaconda with Python 3.5 or 3.6?
There are three ways to get Anaconda with Python 3.5 or 3.6:
We recommend that you download the latest version of Anaconda and then make a Python 3.5 (or 3.6) environment.
Or download the latest version of Anaconda and run the following command to install Python 3.5 (or 3.6) in the root environment: conda install python=3.5
or
conda install python=3.6
Or download the most recent Anaconda installer that included Python 3.5 (Anaconda 4.2.0) or Python 3.6 (Anaconda 5.2.0). You can download either of these from our archive. Scroll down the page until you find the version you need for your platform.
```
不同版本Anaconda的下载地址:https://repo.anaconda.com/archive/
下面的报错版本为Python 3.6.6
![3.6.6-2.png][1]
![3.6.6-1.png][2]
[1]: https://image.joinquant.com/b5dd82b80cf0a7ac19b7d9519e3bd8cf
[2]: https://image.joinquant.com/fd300c9a759bc3b8d6e4328d28a24f07