How to manage multiple python versions in Windows 10/11

* download python 3.10.11 from: https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe

  run the downloads file to install python 3.10.11, remember the python install path(in my case: C:\Users\pzs\AppData\Local\Programs\Python\Python310) and check the option: Add path for pathon when installation

* enter command window, type command to verify the specific python:

  ```

  C:\Users\pzs\AppData\Local\Programs\Python\Python310\python --version

  ```

* install python virtual environment:

  ```

  C:\Users\pzs\AppData\Local\Programs\Python\Python310\Scripts\pip3 install virtualenv

  # the  was installed in : C:\Users\pzs\AppData\Local\Programs\Python\Python310\Scripts, upgrade pip

  C:\Users\pzs\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip

  ```

* create virtual environment py310 in root directory(this will create a directory py310 in current directory):

  ```

  cd\

  C:\Users\pzs\AppData\Local\Programs\Python\Python310\Scripts\virtualenv py310

  ```      

* activate the virtual environment(python 3.10)

  ```

  c:\py310\Scripts\activate

  ```

* from here, you are running in python 3.10 environment, this is independent from other python versions

  ```

  pip install tensorflow

  pip install ....

  ```

* deactivate the virtual environment

  ```

  deactivate

  ```

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值