==========================================================================
安裝anaconda 3 64位版本
cd /opt
mkdir software
cd software
若wget 不存在,yum install wget
wget https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh
chmod 777 Anaconda3-2018.12-Linux-x86_64.sh
./Anaconda3-2018.12-Linux-x86_64.sh
選擇默認python
==========================================================================
創建anaconda的軟連接
ln /root/anaconda3/bin/conda /usr/bin/condavim
==========================================================================
建立python3.7環境
conda create -n python37 python=3.7blog
source activate
source deactivateip
conda activate python37get
==========================================================================
安裝pyalgotrade
pip install pyalgotrade -i https://pypi.tuna.tsinghua.edu.cn/simple/
cd /root/anaconda3/envs/python37/lib/python3.7/site-packages/pyalgotrade/it
==========================================================================
安裝jupyter和jupyterlab
pip install jupyter -i https://pypi.tuna.tsinghua.edu.cn/simple/
pip install jupyterlab -i https://pypi.tuna.tsinghua.edu.cn/simple/
==========================================================================
設置jupyter遠程訪問pip
jupyter notebook --generate-configimport
生成密碼
打開ipython,建立一個密文的密碼:配置
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:51bc6f12cfa3:b1cb64766db2c22ce2e915d6b9e4568ca40ec79e'密碼
把生成的密文‘sha:51…’複製下來
修改默認配置文件
$vim ~/.jupyter/jupyter_notebook_config.py
進行以下修改:
c.NotebookApp.ip='0.0.0.0'
c.NotebookApp.password = u'sha:51...剛纔複製的那個密文'
c.NotebookApp.open_browser = False
c.NotebookApp.port =8888 #隨便指定一個端口
==========================================================================
啓動jupyterlab
cd /root/anaconda3/envs/python37/lib/python3.7/site-packages/pyalgotrade
jupyter lab --allow-root