Recommended environment and usage when developing with Python

Introduction

Here are some recommended environments for developing with Python. I admit any objection because it is my recommendation. Suddenly, I think it's important to be programming ** to develop as stress-free as possible **. ** Find your favorite environment and settings! ** **

Python First, install Python. Install the latest version ** 3.9.0 ** at the time of this writing.

Download installer

First, open the official website and download the installer. Python.org First, open the official Python website. Python.org Hover your mouse cursor over "Downloads" and click "Python 3.9.0". This will download the Python installer.

Installation

Launch the downloaded installer. Python-Installer-1 I think that the installer like this will start, so check the ** "Add Python 3.9 to PATH" ** checkbox. Then click ** "Customize installation" **. Python-Installer-2 Just click ** "Next" ** Python-Installer-3 Just click ** "Install" ** ** "User Account Control" ** will appear, so please ** allow **. Python-Installer-4 The installation will start. Python-Installer-5 The installation is complete. But one more breath. Click ** "Disable path length limit" **. Python-Installer-6 ** Thank you for your hard work! ** ** This time, the installation is complete! However, I will confirm it just in case. ** Press the Windows key and R key at the same time **. Python-Other-1 You will see something like this, so type ** "cmd" ** and press ** OK **. Python-Other-3 This is what comes out. Python-Other-4 Type ** "Python" ** and press Enter. Python-Other-5 If you see a screen like this, you're successful.

Text editor

Move on to the next task. Suddenly, ** I'm programming with Notepad. Is there anyone who says **? ** Stop now. ** ** Perhaps some people find it easier to use Notepad. However, it's not very good, so please be patient. Of course, ** I admit the objection. ** ** Then what should I do! I think some people think so. That's where the ** text editor ** comes in. This time, we will install ** Visual Studio Code ** (often abbreviated as VS Code), which is quite famous for such text editors.

Download installer

code.visualstudio.com First, open the official website of VS Code. code.visualstudio.com It's a pretty good design site ... (VS Code is developed by Microsoft.) While watching, click ** "Download for Windows" **. After a short wait, the download will start.

Installation

Let's install it. VScode-installer-1 When you start the installer, the terms of use will be displayed. Of course, please ** agree **. ~~ (If you disagree, please give up.) ~~ VScode-installer-2 Check all and next VScode-installer-3 Click install VSCode-installer-4 The installation will take place. VScode-installer-5 Installation is complete. ** But that's not all. ** ** ** Need to be set. ** ** Leave the checkboxes and click Finish.

Setting

VScode-setting-1 When you start it, it will be displayed like this, although it is a little different. Then, click ** 5th from the top ** among the icons lined up on the right. VScode-setting-2 I think that such a screen will appear, so enter ** "Japanese" ** in the input field and press Enter. VScode-setting-3 Press Install what says ** Microsoft ** to install. After the installation is complete, please restart ** VS Code **. Then, you can see that it has been translated into Japanese. VScode-setting-4 Next, enter ** "Python" **. As before, press Install what says ** Microsoft ** to install. After the installation is complete, please restart ** VScode ** again just in case. ** This completes the settings! ** **

Recommended file management (?) When programming

The location of the files is also an important environment. This time, I will introduce the recommended file management (?) Method that I use.

Create a folder containing the program!

First, create a folder containing ** programs **. It can be directly under the C drive or in the document. Place it in an easily accessible place. (The desktop can get in the way and is not recommended.)

Create folders for each language!

Create a folder for each language in the program folder. Then

My Program Files
- Python
- Ruby
- C
- C#

I think it will be like this. This will make it easier to understand ** which language you are developing in **.

Create a project folder in the language folder!

Even if I put Poipoi and programs in the language folder, when I handle multiple files, I don't know ** which one is used in the current project **. Therefore, ** create a project folder **. The name of the project folder should be ** project name **.

My Program Files
- Python
- - example1
- - Timer
- Ruby
- - Disbot-Music-01
- C
- C#

Isn't it good to make it like this?

Useful features of VS Code

VS Code comes with some useful features. First of all, there is something to use at least, so I will introduce how to use it.

Open folder

VScode-Other-1 Click ** 1st from the top ** with the icon on the right to display this screen. Click ** Open Folder ** to open the project folder you just created. This will allow you to ** create a file / folder ** and open the file with ** 1 click. ** ** This is quite convenient to use.

Complementary function

When programming with VSCode, "(" is automatically added when you enter "(". This is really convenient. Once you use it, you can't go back.

example.py


print ("Hello World!!")

If you want to enter such a program, all you have to do is enter it like this.

example.py


print ("Hello World!!

It will automatically fill in the back ** "** and **) **. It's very convenient. After that, if you enter p such as "print", candidates (with explanation!) Will appear and you can select it. (You need to install the extension.) Use the extension to customize ** VS Code to your liking! ** **

in conclusion

I personally like VS Code very much and use it. It's a little heavy, but it's very convenient and helpful. Everyone, ** Please prepare the environment and have a fun programming life! ** **

This is Qiita's first post! Thank you for watching so far! Hope this article helps you! There may be some strange Japanese or incorrect knowledge. In that case, please make an edit request. See you in the next article!

Recommended Posts

Recommended environment and usage when developing with Python
Note when creating an environment with python
Clean python environment with pythonz and virtualenv
Building a python environment with virtualenv and direnv
A memo when creating a python environment with miniconda
Python environment with docker-compose
Build PyPy and Python execution environment with Docker
Virtual environment with Python 3.6
Build a python virtual environment with virtualenv and virtualenvwrapper
Findings when accelerating numerical calculations with Python and Numba
Build a python virtual environment with virtualenv and virtualenvwrapper
Manage Python runtime packages and development environment packages with Poetry
Programming with Python and Tkinter
Python and hardware-Using RS232C with Python-
Install Python environment with Anaconda
Manage python environment with virtualenv
Build python3 environment with ubuntu 16.04
Prepare python3 environment with Docker
Build python environment with direnv
Python environment construction and TensorFlow
Error when playing with python
python with pyenv and venv
Works with Python and R
Settings when developing App Engine / Python apps with VS Code
Install CaboCha in Ubuntu environment and call it with Python.
Communicate with FX-5204PS with Python and PyUSB
Environment construction of python and opencv
Shining life with Python and OpenCV
Get started with Python! ~ ① Environment construction ~
Robot running with Arduino and python
Install Python 2.7.9 and Python 3.4.x with pip.
Neural network with OpenCV 3 and Python 3
AM modulation and demodulation with python
[Python] font family and font with matplotlib
Scraping with Node, Ruby and Python
Error when building mac python environment
Build python virtual environment with virtualenv
Setup modern Python environment with Homebrew
Scraping with Python, Selenium and Chromedriver
Scraping with Python and Beautiful Soup
Build Mysql + Python environment with docker
Create a virtual environment with Python!
JSON encoding and decoding with python
Building a virtual environment with Python 3
Hadoop introduction and MapReduce with Python
[GUI with Python] PyQt5-Drag and drop-
Reading and writing NetCDF with Python
I played with PyQt5 and Python3
Python3 environment construction with pyenv-virtualenv (CentOS 7.3)
Reading and writing CSV with Python
Multiple integrals with Python and Sympy
pytorch @ python3.8 environment construction with pipenv
When matplotlib doesn't work with python2.7
Prepare Python development environment with Atom
Coexistence of Python2 and 3 with CircleCI (1.0)
Easy modeling with Blender and Python
When using MeCab with virtualenv python
Precautions when using six with Python 2.5
Sugoroku game and addition game with python
FM modulation and demodulation with Python
[Python] Format when to_csv with pandas