mycpen

Mycpen

记录学习历程与受益知识
github
telegram
bilibili

01_Python-CSDN_Environment_Setup

① Python Interpreter Installation#

  1. Windows Platform

    Download link: https://www.python.org/ftp/python/3.9.5/python-3.9.5-amd64.exe (version 3.9)

    Install python39

    ​ Exe installation: Pay attention to modifying the directory and environment variables

    ​ Installation path: C:/python39 (The installation path can be customized, but be careful not to include special characters such as Chinese or spaces)

    ​ Verification: Press "win+R" on the keyboard, enter "cmd", and test in the command line

    ​ C:\Users\cPenadm>==python -V==

    ​ Python 3.9.5

  2. Linux Platform

    Comes with python (different versions of operating systems come with different versions of python)

    CentOS-yum installation (version 3.6)

    yum install epel-release
    yum install python36
    yum install python36-devel
    

② Setting up pip Tool#

pip is a Python package management tool that provides functions for finding, downloading, installing, and uninstalling Python packages.

Configure domestic source
Solve the problem of slow installation

  1. Method 1

    Upgrade pip to version 10.0 or above

    pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
    
  2. Method 2

    1. Windows Platform

      • Create directory and file ==C:\Users<your username>\pip\pip.ini==

      • The content of the pip.ini file is as follows: Modify it to Alibaba's source, other domestic sources are also acceptable

        [global]
        index-url=http://mirrors.aliyun.com/pypi/simple/
        [install]
        trusted-host=mirrors.aliyun.com
        
    2. Linux Platform

      mkdir  ~/.pip
      vim  ~/.pip/pip.conf
      #Enter the following content
      [global]
      index-url = https://pypi.tuna.tsinghua.edu.cn/simple
      

③ PyCharm Installation#

PyCharm is a Python IDE developed by JetBrains, supporting macOS, Windows, and Linux systems.

Integrated Development Environment (IDE) is an application used to provide a programming development environment, generally including code editor, compiler, debugger, and graphical user interface tools.

Advantages: User-friendly interface, debugging, syntax highlighting, project management, code navigation, intelligent suggestions, auto-completion, unit testing, version control, etc.

  1. Download link

    Official website: http://www.jetbrains.com/pycharm/

  2. Installation

    Community Edition: Free to use, no activation required

    Professional Edition: More features, activation required

  3. Activation

    Open pycharm, execute: Help-Register

    image-20220305214732025

  4. Configure Python Interpreter

    Reference: https://zhuanlan.zhihu.com/p/40716785

    image-20220305214846212


Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.