Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Python3.4 + pycharm environment and use pycharm

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

How to install Python3.4 + pycharm environment and how to use pycharm? I believe many inexperienced people are at a loss about this. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

The following mainly introduces the installation of python in windows environment. As a new way to use python, it is recommended to install only one python version on your computer.

Step 1: download and install python-3.4.4amd.msi

You can download it from the official website, double-click the .msi file, and install it all the way.

Step 2: configure environment variables

It is easy to use python command and pip command. This step requires the configuration of two environment variables.

1. Configure the path to python.exe: configure the installation directory of python to the path of the environment variable. How to configure environment variables?

(https://www.cnblogs.com/huangbiquan/p/7784533.html)

For example, if python is installed in D:\ python34, add this directory to the environment variable path

2. Configure the path to pip.exe:

The pip command is in the Script directory under the python directory. So in order to install third-party libraries later using pip, you also need to configure environment variables.

Taking the example in 1 as an example, add D:\ Python34\ Scripts to the environment variable path

Step 3: test

Open your cmd command line panel and type python to see if the prompt is successful. If the installation is successful, press Ctrl + C to exit, and then enter the pip command to check whether the environment variables of the pip command are configured successfully.

Note that problems that may be encountered:

1) when you run the pip command here, you may encounter the following prompt: Did not provide a command

Solution:

1. Enter command on the command line: where pip

2. In the environment variable of the system, configure the environment variable of python (the third in the figure above) to the front.

2) on the basis of processing 1), running python can be successful, but running pip command prompts an error: Fatal error in launcher: Unable to create process using'"'

When confirming that there is only one version of python in the local environment, upgrade the pip command with the following command: python-m pip install-- upgrade pip

Installation and use of pycharm

Once the python environment is installed, it is time to install the tools for writing code. Pycharm is used here as a tool for writing code. Installation is also very simple, all the way next can. Click on your desktop.

To enter the pycharm. To use the professional version, you can refer to the cracking method in this article. Https://blog.csdn.net/u014044812/article/details/78727496 is available for personal testing.

But, who just got in touch with python, you'd better use the free version honestly, otherwise there will be a lot of problems.

Pycharm is easy to use

Add a wave of basic usage of pycharm. After opening pycharm

1. Create a Project:

All python code is best placed under project to make it easy to manage python files.

Toolbar: New-New Project.

In the pop-up panel (as shown below), select the project directory.

It is recommended that you specify a special directory to store python code. As shown in the figure, use the E:\ Pycharm_workspace directory to store the python code specifically.

Project Interpreter: refers to the python environment currently used by the python project, that is, which version of python you plan to use to run your python code.

Free Community Edition: the python version configured in the environment variables is used by default.

Paid Professional Edition: a new virtual environment will be created for you by default (developing python projects is easy to use, beginners can skip it first, otherwise it is easy to dig holes). You need to manually change to: the python that is already installed on the system.

2. Create a python file:

Right-click the project name (My_Test in the figure)-New-python file, enter the file name-click OK. The created file is automatically opened.

3. Write and run python code

In the edit area, enter the following: print ("Hellocharge Pythonium!")

Right-click in the space-Run

After the run is complete, the console area is automatically displayed at the bottom of the page.

After reading the above, have you mastered how to install the Python3.4 + pycharm environment and how to use pycharm? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report