安装JQData
更换源:
如果使用的是pip默认的PyPI源,可以尝试更换为一个更快的国内镜像源。例如阿里云、豆瓣等提供的PyPI镜像。 更改方法可以通过设置环境变量或者在pip命令中直接指定:
PS C:\Users\bilirjs\Documents> pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
Writing to C:\Users\bilirjs\AppData\Roaming\pip\pip.ini
PS C:\Users\bilirjs\Documents> pip install jqdatasdk
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting jqdatasdk
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/8a/41/2fd0ed3bd938f84ac4f226b47fa93cca2b4af5571a4144b000c0d3dc1988/jqdatasdk-1.9.6-py3-none-any.whl (77 kB)
--------------------------------------- 77.3/77.3 kB 1.1 MB/s eta 0:00:00
Requirement already satisfied: six in c:\programdata\anaconda3\lib\site-packages (from jqdatasdk) (1.16.0)
Requirement already satisfied: requests in c:\programdata\anaconda3\lib\site-packages (from jqdatasdk) (2.32.2)
Requirement already satisfied: numpy>=1.9.2 in c:\programdata\anaconda3\lib\site-packages (from jqdatasdk) (1.26.4)
Requirement already satisfied: pandas>=0.16.2 in c:\programdata\anaconda3\lib\site-packages (from jqdatasdk) (2.2.2)
Requirement already satisfied: SQLAlchemy>=1.2.8 in c:\programdata\anaconda3\lib\site-packages (from jqdatasdk) (2.0.30)
Collecting pymysql>=0.7.6 (from jqdatasdk)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/0c/94/e4181a1f6286f545507528c78016e00065ea913276888db2262507693ce5/PyMySQL-1.1.1-py3-none-any.whl (44 kB)
--------------------------------------- 45.0/45.0 kB 2.2 MB/s eta 0:00:00
Requirement already satisfied: msgpack>=0.4.7 in c:\programdata\anaconda3\lib\site-packages (from jqdatasdk) (1.0.3)
Collecting thriftpy2<=0.4.20,>=0.3.9 (from jqdatasdk)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/44/c3/20664039450f04a5630b68daaa00d539c9cd5338a17d5a28c3a553c10de2/thriftpy2-0.4.20.tar.gz (689 kB)
------------------------------------- 689.0/689.0 kB 3.1 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: python-dateutil>=2.8.2 in c:\programdata\anaconda3\lib\site-packages (from pandas>=0.16.2->jqdatasdk) (2.9.0.post0)
Requirement already satisfied: pytz>=2020.1 in c:\programdata\anaconda3\lib\site-packages (from pandas>=0.16.2->jqdatasdk) (2024.1)
Requirement already satisfied: tzdata>=2022.7 in c:\programdata\anaconda3\lib\site-packages (from pandas>=0.16.2->jqdatasdk) (2023.3)
Requirement already satisfied: typing-extensions>=4.6.0 in c:\programdata\anaconda3\lib\site-packages (from SQLAlchemy>=1.2.8->jqdatasdk) (4.11.0)
Requirement already satisfied: greenlet!=0.4.17 in c:\programdata\anaconda3\lib\site-packages (from SQLAlchemy>=1.2.8->jqdatasdk) (3.0.1)
Requirement already satisfied: ply<4.0,>=3.4 in c:\programdata\anaconda3\lib\site-packages (from thriftpy2<=0.4.20,>=0.3.9->jqdatasdk) (3.11)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\programdata\anaconda3\lib\site-packages (from requests->jqdatasdk) (2.0.4)
Requirement already satisfied: idna<4,>=2.5 in c:\programdata\anaconda3\lib\site-packages (from requests->jqdatasdk) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\programdata\anaconda3\lib\site-packages (from requests->jqdatasdk) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in c:\programdata\anaconda3\lib\site-packages (from requests->jqdatasdk) (2024.6.2)
Building wheels for collected packages: thriftpy2
Building wheel for thriftpy2 (pyproject.toml) ... done
Created wheel for thriftpy2: filename=thriftpy2-0.4.20-py2.py3-none-any.whl size=472000 sha256=f42557155b93ef6c7c7d46be80ee0c871f4808d65c2d9c8a73ed36b068a483a2
Stored in directory: c:\users\bilirjs\appdata\local\pip\cache\wheels\7c\aa\13\a7e7c6af599068c50708d3fe9301ab8e3d7e6adeb89a895aac
Successfully built thriftpy2
Installing collected packages: thriftpy2, pymysql, jqdatasdk
Successfully installed jqdatasdk-1.9.6 pymysql-1.1.1 thriftpy2-0.4.20
PS C:\Users\bilirjs\Documents>
直接安装报错,使用国内源