In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what is the method of building the Python environment". In the daily operation, I believe that many people have doubts about the method of building the Python environment. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what is the method of building the Python environment?" Next, please follow the editor to study!
1. Conceptual distinction
For a rookie who has just started to learn Python, it may be easy to confuse the concepts of Pycharm, Python interpreter, conda installation, and pip installation. Let's get to know them one by one:
(1) Pycharm is an integrated development environment (Integrated Development Environment, referred to as IDE) developed by Python, which cannot execute Python code itself.
(2) Python interpreter is the real tool for code execution. Python interpreter can be set in pycharm. Generally, we can download Python3.7 or Python3.8 version from Python official website. If anaconda is installed, it must also include a certain version of Python interpreter. Pycharm can configure Python interpreter whichever one you want.
(3) anaconda is a collection of all the commonly used packages of python, and provides us with a very convenient installation of various Python packages using the conda command.
(4) conda installation: after we have installed the anaconda software, we can use the conda command to download the package in the anaconda source (such as the mirror source of the University of Science and Technology).
(5) pip installation: it is also a python installation method similar to conda installation. If you have used the Centos system, it is just like yum installation.
2. Modify the mirror source
There will be slow or failed installation of some packages using the installation conda. The most effective way is to modify the mirror source to the domestic mirror source. Tsinghua Mirror Source has been selected before, but the service has been stopped after 2019. It is recommended to choose the mirror source of China University of Science and Technology.
First check the installed mirror source, and the cmd window executes the command:
Conda config-show
Check the configuration item channels. If it is shown with tsinghua, it means that Tsinghua image has been installed.
Channels:
Https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/
Https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
Https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
Https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
Https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
Next, delete the Tsinghua image using the conda config-- remove channels url address, and delete the first one with the following command. Then, delete all mirror sources in turn
Conda config-- remove channels https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/
Add the currently available mirror sources of China University of Science and Technology:
Conda config-- add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
And set the channel address to be displayed when searching:
Conda config-set show_channel_urls yes
Confirm whether the mirror source is installed successfully, execute conda config-- show, and find the channels value as follows:
Channels:
Https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
Defaults
At this point, the study on "what is the method of building a Python environment" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.