Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the relationship between vscode and anaconda

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces what is the relationship between vscode and anaconda, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Anaconda is a very easy to use open source python distribution, comes with a bunch of common python libraries, has the Windows,MacOS,Linux version, and is a great tool for managing python.

VSCode is a free and open source modern lightweight code editor that supports almost all mainstream development languages such as syntax highlighting, intelligent code completion, custom hotkeys, parenthesis matching, code snippets, code comparison Diff, GIT and other features, supports plug-in extensions, and optimizes web development and cloud application development.

The software supports Win, Mac and Linux across platforms.

Anaconda+VSCode is often used to build a python environment at work.

I use the Windows version, the Win10 operating system

1. Install Anaconda

Download the installation package, install it to the specified path (preferably not disk C), click next and install it. You will be prompted to install VS Code along the way.

After installation, run cmd:conda-version to see if it is installed, and then run conda activate to enter the anaconda environment.

Conda activate is equivalent to direct point Anaconda Prompt shortcuts.

2. Create the Python subenvironment of Anaconda

The Python subenvironment of Anaconda is all in the installation path anaconda3\ envs. Type conda create-n test python=3.6.6 first to create a 3.6.6 Python subenvironment.

Enter y and you will ok.

Similarly, you can create python2.7,python3.7, you can play with various seed environments, and you can install various packages through conda or pip.

3. Python subenvironment switching of Anaconda

After you have created it, you can activate the subenvironment through activate test, and then exit the subenvironment through deactivate

4. VSCode python path assignment

Open VSCode and see if there are these plug-ins:

Then under File---- > Preferences---- > Settings, select Extensions- > Python Configuration, as shown in the figure:

Then click Edit in settings.json to change the original python path to the python path of the subenvironment you need.

"python.pythonPath": "D:\\ Anaconda3\\ envs\\ test\\ python.exe" Thank you for reading this article carefully. I hope the article "what is the relationship between vscode and anaconda" shared by the editor will be helpful to you. At the same time, I hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report