环境问题
背景: 换了电脑,当前的电脑原先就装着Python3.9.0
直接pip install d2l & torch can work
but when i start the jupyter, it use the anaconda SDK which is 3.6.4
so i need to install the d2l& torch under anaconda python sdk
but not work i cannot install it
below are the issues i met :
- proxy issue coz i use the vpn so need to resolve it ---- after i fix the proxy, use
conda install python=3.9.0 still not work (condarc control proxy issue need to add the cer in here and add the reflect net in here)
So i search and find we can use the mult evn in conda,that’s cool! like
roort evn — point to 3.6.5 & torch xxx
d2l env — point to python 3.9.0 & torch 1.7.0
so i use below steps to create an env in conda
- conda create -n evn_name python=3.9.0
- active your new environment by use command “conda activate evn_name”
- now check your python version
python -V - if it works , now use the pip to install all your plugins
- last steps but import, u must close your before jupyter
and run the jupyter start in ur anaconda prompt under this new env…only do this , u can use the evn you want in the jupyter