安裝
直接去官網下載 一路回車
官網python
創建python虛擬環境 和咱們平時同樣 不一樣的是在創建完以後 要安裝一個kernel
Using Python3 with pip and a virtual environmentcode
python3 -m venv my_environment_name # create a virtual environment source my_environment_name/bin/activate # activate the virtual environment python -m pip install ipykernel -i https://pypi.doubanio.com/simple/ # install the python kernel (ipykernel) into the virtual environment python -m ipykernel install
Using Python 2 with pip and a virtual environmentip
python -m pip install virtualenv # install a package for creating virtual environment cd my_project_folder # create a project folder virtualenv my_project # create a virtual environment source my_project/bin/activate # activate the virtual environment python -m pip install ipykernel -i https://pypi.doubanio.com/simple/ # install the python kernel (ipykernel) into the virtual environment python -m ipykernel install
使用這個py環境打開nteractget
# 在環境激活的狀況下 nteract -k python3