In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to configure the environment in Python machine learning, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!
Anaconda installation
Official link to anaconda: Anaconda | The World's Most Popular Data Science Platform
Click Get Started
Click Download Anaconda installers
Download the corresponding installation package according to your operating system.
Install anaconda
Click all the way down and the installation is complete.
Configure the python3.6 environment using conda
At present, the stable version of python3 is 3.6. a virtual environment of python3 is built through anaconda.
First, let's take a look at the python version of the base environment. Click on the search bar of windows, type anaconda, and open Anaconda Prompt.
Enter a command
Conda create-n pytorch python=3.6
Build a virtual environment called pytorch. And activate the environment, enter the command.
Configuration and use of Spyder
Pycharm as a whole, the best IDE,Spyder for python is the IDE provided by Anaconda, which I think is easier to use when editing some simple programs or debugging programs. Here's a recommendation.
Open Anaconda Navigator.
Upgrade and switch the pytorch environment we just activated.
Open Spyder
You can select part of the code, press F9, and execute only the selected code block, which is suitable for debugging.
Install PyTorch
Log on to the PyTorch website: PyTorch
Select the operating system, cuda mode, copy the installation command.
Anaconda Prompt activates the pytorch environment and executes the command. Wait for the installation.
If you find that the installation is slow, it is recommended to add a domestic source to anaconda. And I don't recommend Tsinghua Yuan, because it's too stuck. Here I would like to recommend the source of Beiwai. The specific operations are as follows:
Open the .condarc file in the user directory and update it as follows.
Channels:
-defaults
Show_channel_urls: true
Default_channels:
-https://mirrors.bfsu.edu.cn/anaconda/pkgs/main
-https://mirrors.bfsu.edu.cn/anaconda/pkgs/r
-https://mirrors.bfsu.edu.cn/anaconda/pkgs/msys2
Custom_channels:
Conda-forge: https://mirrors.bfsu.edu.cn/anaconda/cloud
Msys2: https://mirrors.bfsu.edu.cn/anaconda/cloud
Bioconda: https://mirrors.bfsu.edu.cn/anaconda/cloud
Menpo: https://mirrors.bfsu.edu.cn/anaconda/cloud
Pytorch: https://mirrors.bfsu.edu.cn/anaconda/cloud
Simpleitk: https://mirrors.bfsu.edu.cn/anaconda/cloud
Execute the command on the command line to clean up the cache.
Conda clean-I
After the installation is complete, check the pytorch version.
Conda list
These are all the contents of the article "how to configure the Environment in Python Machine Learning". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.