Configuring IDEs for Python and R languages
This page briefly describes how to config the IDLE, Wing IDE, VS Code, and PyCharm IDEs for Python and RStudio for R.
IDLE (Python)
1. Install a basic distribution of the Python language from one of the latest versions (for example,
3.7,
3.8,
3.9).
When installing, pay attention to the directory in which the Python system will be located,
because the path to this directory will need to be specified when setting up the IDLE IDE for the taskbook
(by default, the Python is installed in a subdirectory of the directory associated with the current user,
for example, C:\Users\<UserName>\AppData\Local\Programs\Python\Python39 ).
During installation, select all suggested components.
2. Run the PT4Setup program (Start | All programs | Programming Taskbook 4 | PT4 Setup)
and make sure that the taskbook has detected the IDLE (Python) IDE.
If the path to the executable file pythonw.exe is not found by the taskbook,
then specify it by clicking the Browse button. Close the PT4Setup program.
As a result of the steps described above, the taskbook will be set up to be used
with the IDLE environment for the Python language.
Additional installation of the NumPy and Pandas modules for the Python language
Starting with version 4.25 of the taskbook, additional tools have been added to simplify
the study of arrays in the NumPy module and Series and DataFrames structures in the Pandas module.
In particular, new task groups TablBase and TablExt can be used to study tabular data processing techniques.
To use the NumPy and Pandas modules, you must explicitly install them on your computer after installing the base
version of the Python system. To do this, just go to the Scripts subdirectory of the Python system directory
(for recent versions of Python their system directories by default are located at the following path:
C:\Users\<user_name>\AppData\Local\Programs\Python\ ) and run the program pip.exe with the following parameters:
pip install numpy
pip install pandas
Alternatively, you can create a run.bat batch file with these commands
in the specified directory, and then run this batch file.
Wing IDE Personal and Wing IDE 101 (Python)
1. Install a basic distribution of the Python language
by following the steps in items 1 and 2 of the IDLE subsection.
2. Install one of the Wing IDE distributions:
Wing IDE Personal 6.0 or
Wing IDE 101 6.0.
The Wing IDE 101 environment is simpler to use.
3. Run the PT4Setup program (Start | All programs | Programming Taskbook 4 | PT4 Setup)
and make sure that the taskbook has detected the Wing IDE Personal (Python) or Wing IDE 101 (Python) IDE.
If the path to the executable file wing-personal.exe or wing-101.exe is not found by the taskbook,
then specify it by clicking the Browse button.
On a standard installation, these environments are located in the Wing IDE
subdirectories of the directory C:\Program Files (x86) .
Close the PT4Setup program.
As a result of the steps described above, the taskbook will be set up to be used
with the Wing IDE environments for the Python language.
VS Code (Python)
1. Install a basic distribution of the Python language
by following the steps in items 1 and 2 of the IDLE subsection.
2. Install VS Code https://code.visualstudio.com/download#,
(Windows, 64 bit, User Installer or System Installer).
If you select System Installer, the environment will be installed in the directory C:\Program Files ,
if you select User Installer, then the environment will be installed in the subdirectory of the current user directory,
for example, C:\Users\<UserName>\AppData\Local\Programs\Microsoft VS Code .
3. Run the PT4Setup program (Start | All programs | Programming Taskbook 4 | PT4 Setup)
and make sure that the taskbook has detected the Visual Studio Code (Python) IDE.
If the path to the executable file Code.exe is not found by the taskbook,
then specify it by clicking the Browse button. Close the PT4Setup program.
4. Run the PT4Load program,
call its context menu (by right-clicking) and select the Visual Studio Code (Python) command
In the Task field, enter the name of a task (for example, Begin1) and press [Enter] of click the Load button.
The created template file will be loaded into the VS Code editor. The first time you load a file with the .pyw extension,
the VS Code editor will prompt you to install the Python language extension pack. When this extension pack is installed,
you will be able to start Python programs from VS Code by pressing [F5].
As a result of the steps described above, the taskbook will be set up to be used
with the VS Code environment for the Python language.
PyCharm (Python)
1. Install a basic distribution of the Python language
by following the steps in items 1 and 2 of the IDLE subsection.
2. Download and install PyCharm IDE https://www.jetbrains.com/pycharm/download/#section=windows,
(Community (Free) version).
When installing, pay attention to the directory in which the PyCharm IDE will be located,
because the path to this directory will need to be specified when setting up the PyCharm IDE for the taskbook
(by default, the PyCharm IDE is installed in a subdirectory of the Program Files directory,
for example, C:\Program Files\JetBrains\PyCharm Community Edition 2021.3.1 , and
the pycharm64.exe file is located in the bin subdirectory).
3. Run the PT4Setup program (Start | All programs | Programming Taskbook 4 | PT4 Setup)
and make sure that the taskbook has detected the PyCharm (Python) IDE.
If the path to the executable file pycharm64.exe is not found by the taskbook,
then specify it by clicking the Browse button. Close the PT4Setup program.
4. Run the PT4Load program,
call its context menu (by right-clicking) and select the PyCharm (Python) command
In the Task field, enter the name of a task (for example, Begin1) and press [Enter] of click the Load button.
The created template file will be loaded into the PyCharm IDE.
5. The Edit configuration dialog box may appear at the first run of the Python project in the PyCharm IDE.
This happens when the executing system (the Python interpreter) is not yet linked to the created project.
The bottom part of the Edit configuration window will display a message
"Please select a valid Python interpreter".
In order to connect the Python interpreter to the project,
you must close the Edit configuration window and execute the File | Settings menu command.
The Settings dialog box will appear on the screen in which you should select the section
Project PT4Work | Python Interpreter.
On the right side of the window, expand the Python Interpreter drop-down list.
If this list contains only text No interpreter, then select the Show All option
in it and click on the button with the symbol "+" in the new window.
The new window Add Python Interpreter will appear.
In the left part of the window, select the System Interpreter option,
and, in the right part of the Interpreter drop-down list, specify the required Python interpreter.
Then close all previously open windows by clicking the OK button in each of them.
You only need to configure the Python interpreter once;
afterwards, the interpreter will be chosen automatically for all projects.
As a result of the steps described above, the taskbook will be set up to be used
with the PyCharm IDE for the Python language.
RStudio (R)
1. Install the base distribution of the R language of one of the latest versions for Windows (e.g.,
4.3.2).
2. Download and install the RStudio environment. It is recommended to use version
2023.12,
which has been tested to work correctly together with the Programming Taskbook.
3. Run the PT4Setup program included in the electronic taskbook (Start | All Programs | Programming Taskbook 4 | PT4 Setup)
and make sure that the taskbook detects the RStudio environment.
If the path to the rstudio.exe executable file is not found by the taskbook, specify it by clicking the Browse button.
In a standard installation, the rstudio.exe file is located in the RStudio subdirectory of the C:\Program Files directory.
Close the PT4Setup program.
As a result of the steps described above, the taskbook will be set up to be used
with the RStudio IDE for the R language.
|