使用Anaconda创建虚拟环境,并在VScode中使用anaconda环境

This blog is about how to use anaconda to create virtual environment.
You are welcomed to chat about it and if you like this blog, do not forget to give me a like.

Welcome to see my homepage and contact me: NicholasYe’s Homepage.


1. Install anaconda

First, you should install anaconda, then you will see these applications in the start menu.

图片.png

  • Here is what main apps means:
AppExplain
Navigatorthe UI interface
Powershellthe powershell of anaconda
Spyderthe coding platform

2. The method of creating a virtual environment

  1. Open Anaconda Powershell Prompt

图片.png

  1. using conda create -n your_env_name python=x.x

    • your_env_name: enter a specific name to identify different environment
    • python=x.x: the version of python in environment
    • Remember to close you proxy!!
  2. use activate your_env_name to activate your environment

图片.png

  1. use pip list to check your package

图片.png


3. Coding in VScode with different environment

  1. You should install Python Extension in VScode

图片.png

  1. create a .py file and choose the environment

图片.png
conda clean -p //删除没有用的包
conda clean -t //tar打包
conda clean -y -all //删除所有的安装包及cache


Please clearly mark the source of the article in the process of reproducing it! Respect for originality and intellectual property rights, thanks!

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值