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.
- Here is what main apps means:
App | Explain |
---|---|
Navigator | the UI interface |
Powershell | the powershell of anaconda |
Spyder | the coding platform |
2. The method of creating a virtual environment
- Open Anaconda Powershell Prompt
-
using
conda create -n your_env_name python=x.x
your_env_name
: enter a specific name to identify different environmentpython=x.x
: the version of python in environment- Remember to close you proxy!!
-
use
activate your_env_name
to activate your environment
- use
pip list
to check your package
3. Coding in VScode with different environment
- You should install Python Extension in VScode
- create a .py file and choose the environment
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!