Python learning preparation: Anaconda and Pycharm installation and environment creation

In the past few days, I changed my computer and needed to reconfigure these environments. In addition, I had always had the idea of ​​writing a blog summary before. It happened with this as a starting point and continued to update. Starting today, I hope I can keep writing down! I mainly used Anaconda and Pycharm before, so this time I recorded these two installation methods.

One, Anaconda

1. What is  Anaconda?

     Anaconda is a Python distribution for scientific computing. It supports Linux, Mac, and Windows systems. It provides package management and environment management functions. It can easily solve the problems of coexistence, switching of multiple versions of Python, and installation of various third-party packages. Anaconda uses tools/commands condafor package and environment management, and has included Python and related supporting tools. 

Conda  is a management system for open source packages and virtual environments.

2.  Anaconda installation

       First, download the installation package. There are two ways to download Anaconda:

     Download from the official website and choose the installation package that suits your computer version. https://www.anaconda.com/download/

     The download on the official website is relatively slow, and you can download it from the open source software mirror station of Tsinghua University.

     https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/

     Double-click the Anaconda installation package and follow the steps below to install:

     

    

   Because it is my own notebook, I chose to do it for all users, depending on my needs.

    

During the installation process, because I was too lazy to configure environment variables, I directly checked Add environment variables

    

   

  

  

  Successful installation. If you are a windows user, you can open a command window and enter'python' to see if the installation is successful

Open Anaconda file

 

 

 

Anaconda Cloud  is a place to manage public or private python notebooks, condas, environments and packages, which can be easily shared and tracked.

Anaconda Navigator  is the visual management interface of Anaconda.

Anaconda Prompt  is an Anaconda terminal that can conveniently operate the conda environment.

Jupyter Notebook  starts with the IPython 3.x version, which is the last unified version, including notebook, qtconsole, etc. Starting from IPython 4.0, IPython only concentrates on being an interactive shell, which becomes lightweight, and The remaining notebook format, qtconsole, and notebookweb application are all separated and named as Jupyter. So far, IPython and Jupyter are separated.

JupyterQtconsole  calls the interactive command console. Starting from IPython 4.0, many IPython subcommands have now become Jupyter subcommands, such as ipython notebook is now jupyter noteboook.

ipython is a python interactive shell, which is much easier to use than the default pythonshell. It supports automatic variable completion, automatic indentation, supports bash shell commands, and has many useful functions and functions built-in. Learning ipython will allow us to use python with a higher efficiency. At the same time, it is also the best platform for scientific computing and interactive visualization using Python.

Spyder  is an open source cross-platform scientific computing IDE using Python language, and a simple integrated development environment. Spyder can be cross-platform, can also be expanded with additional components, with interactive tools to process data.

Two, Pycharm

 After configuring Anaconda, you can actually use the installed ipython and spyder to write code, but I personally feel that Pycharm is very useful. Basically, the code is typed on Pycharm, so the installation process is recorded.

1. Pycharm installation

Download the installation package, just download it directly from the official website. http://www.jetbrains.com/pycharm/download/#section=windows

Follow the steps

Path set by yourself

The installation is complete, and it will be combined with the third part of the environment when it is used.

 

Three, use conda to establish the operating environment

 Write the code needed for the build process directly here.

 

1. Build an environment called scikit-learn

Windows system enters the "run" interface, enter "cmd", confirm

(1) conda env list #Display the existing environment

     

(2) conda create -n scikit-learn python #Create environment

(3) y Enter

(4) activate scikit-learn #Enter the environment

(5) conda list #View the packages that exist in the environment

(6) pip install ...... #install package

(7) deactivate #Exit the environment

 

2. Configure the built scikit-learn environment into Pycharm and start programming

(1) Double-click Pycharm, click to create a new project

(2) Select the location and project name to create the project, select "Existing interpreter"

(3) Follow the steps below to select the path and find the environment that has just been configured

(4) Successfully created

(5) Create a new py file and you can write code happily.

The words written at the back:

      I have finished writing my first blog. It is very basic. I hope it can give some enlightenment to friends who are just getting started and avoid some detours. I remembered that when I first came into contact with python, I didn't even know where to type the code. I was even more confused about what Ipython, spyder, and pycharm were. In the process of exploring slowly, I finally found my favorite compiler. When using Pycharm, I didn't know how to configure the environment I had created. Therefore, taking this opportunity to write down the details, I hope that I can continue to learn and update in the future~~

      If there is any inappropriateness in the article, you are welcome to criticize and correct~~

Guess you like

Origin blog.csdn.net/xcntime/article/details/113874268