- 创建虚拟环境
-
mkvirtualenv -p python3 sp
-
- 安装依赖包
- 使用包
matplotlib==2.2.2 numpy==1.14.2 pandas==0.20.3 TA-Lib==0.4.16 tables==3.4.2 jupyter==1.0.0
- 安装(我存放在文件中)
pip install -r requirements.txt
- Ta-Lib安装会出现问题,需要先安装依赖库,按照以下步骤安装:
# 获取源码库 sudo wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz # 解压进入目录 tar -zxvf ta-lib-0.4.0-src.tar.gz cd ta-lib/ # 编译安装 sudo ./configure --prefix=/usr sudo make sudo make install # 重新安装python的TA-Lib库 pip install TA-Lib
- 使用包
- 使用 jupyter notebook
- 进入虚拟环境
- 直接输入jupyter-notebook
- notebook 默认的URL是http://localhost:8888
- 点击 新建 > python3
- 改名字 双击名字然后输入
- 编辑 print ('hello word')