Problems I encountered in Python learning I encountered in python Learning

Source: Internet
Author: User
Tags virtual environment

Problems I encountered in Python learning I encountered in python Learning

Development Tool: PyCharm

System: macOs Serria 10.12.4

Jetbrains, produced by jetbrains, is a brother product of idea and continues the ease of use of idea, and the operation buttons are basically the same.

 

I. execution environment problems

1. py executable Virtual Environment Settings

By default, simple code or function calls written in Python can be executed right-click, as shown in figure

The common problem is that the execution environment is switched. Because Python2 and Python3 are completely different versions and do not have an inheritance relationship, some code can only run on Python2, some of them can only run on Python3. Therefore, our project may need two environments for execution. to modify the execution environment of the current project, refer to the following:

 

 

 

 

 

Here, you can set up a separate virtual execution environment, or even multiple. Generally, you are not recommended to directly use the built-in execution environment of the system to re-download or install an independent new environment, in this way, when the project code needs to install a new dependent package, the installation will not have any permission issues, if a built-in execution environment is used, unpredictable impact may occur to other functions or applications during the modification process.

During configuration, the Location is automatically processed according to the project's Location, and the Location of the Python execution environment that has been downloaded and installed is directly selected at the Base interpreter Location.

After the configuration is complete, an independent execution environment will come out.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.