Running a python program in Pycharm

Source: Internet
Author: User

Installing Pycharm

The installation process depends on your operating system:

install Pycharm on Windows

Run .exe you have downloaded the file and follow the instructions in the Pycharm Installation Wizard.

install Pycharm on MacOS

Open .dmg you have downloaded the software package and dragged Pycharm to the Applications folder.

installing Pycharm on Linux

.tar.gz Unpack the archive you downloaded to any desired installation location. the entire process is as follows: <pycharm-professional or pycharm-community>-*.tar.gz If your current downloads folder does not support file execution, unzip the file to a different folder:

tar xfz <pycharm-professional or pycharm-community>-*.tar.gz -C <new_archive_folder>
    1. According to the file system hierarchy Standard (FHS), the recommended installation location is /opt . For example, you can enter the following command:

      sudo tar xf <pycharm-professional or pycharm-community>-*.tar.gz -C /opt/Cut
    2. Switch to bin directory:cd <new archive folder>/<pycharm-professional or pycharm-community>-*/bin
      For example,cd opt/<pycharm-professional or Pycharm-community>-*/bin
Start Pycharm

Since 2016.1 Pycharm uses Java 1.8. If you want to change the JDK Pycharm is running, use this action to switch the boot jdk. to invoke this action, use search everywhere or find actions .

start pycharm on Windows

If you chose to create a shortcut on the desktop during installation, double-click the shortcut.

Otherwise, go to <PyCharm>\bin folders, such as C:\Program Files (x86)\JetBrains\PyCharm 2017.1\bin ) and run pycharm.exe , pycharm64.exe or pycharm.bat .

start pycharm on MacOS

In the Application folder, double-click the Pycharm icon.

booting the pycharm on Linux

pycharm.shRun from a bin subdirectory.

import Preferences from a previous version

when you start Pycharm for the first time, The Complete Setup dialog box opens, and you can import pycharm using preferences and licensing information from a previous version.

Select one of the following options, and then click OK.

    • I want to import my settings (<path>) from a previous version. If this option is present in the dialog box, the directory containing the Pycharm settings and license information is in its default location. (the corresponding path is shown in the option name within parentheses.) Most likely, this is the option you want.
    • I want to import my settings from a custom location. You may have a directory of settings and license information available, but not in the default location. If the options discussed above are missing, Pycharm does not know where the directory is; The path initially shown in the field is just a guess, and there is no guarantee that the necessary folders are really there. to import the settings in this case, you can use the settings (if you know where it is) or the previous Pycharm version of the installation folder to specify the folder. To do this, click and select the folder in the Open dialog box.
    • I don't have a previous version of Pycharm, or I don't want to import my settings. If this is the case, select this option.

After installing the Pycharm, briefly introduce the following methods: Mac Version

1. Open the installed Pycharm, create a new project, the first line of the path can be modified after the name, the second row can tick the Python version you want to use, and then create.

2. Right-click after new (I set my Mac to work like Windows), and create a new Python file to compile.

3. The default color font, etc., can be modified in "pycharm--preferences--editor--colors&fonts" if it is not appropriate. The default editing area is white and can be changed in "General" if you want to change to a different color.

The default font size is small, if you need a larger one, in the "Font" interface can not be modified, you need to save as a theme of their own font, and then change the sizes.

Create a file automatically generated script header file, including character set, script information, creation time:

Modify in: "Pycharm--preferences--editor--file and Code Templates"

After you set your preferences, you can try to write and run.

When you're done, click "Run" at the top to run it, and you'll be prompted to run it and choose what you want to run.

After the first run, the run symbol in the upper-right corner becomes clickable and can be run directly with the shortcut key Control+r or by clicking the Run button.

Running a python program in Pycharm

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.