Troubleshooting PyCharm Installation Failures in the Virtual Machine
1. Introduction
When installing PyCharm according to Basic General Course\Basic Course\Python Lesson\Lesson 1 Python Introduction and Installation, some may encounter installation or startup failures due to a version incompatibility between PyCharm and the Ubuntu 18.04 virtual machine image.
2. Issue Description
Following the installation steps in Basic General Course\Basic Course\Python Lesson\Lesson 1 Python Introduction and Installation, a version mismatch between PyCharm and the provided Ubuntu 18.04 virtual machine image results in the following error:
This specific error leads to installation and execution failures. The error can be resolved by installing an older version of PyCharm.
3. Solution
- Open the terminal
and enter the following command:
Wget https://download.jetbrains.com/python/pycharm-community-2021.3.3.tar.gz
When the progress bar reaches 100%, the PyCharm installation package has been successfully downloaded and can be found in the
folder.
- Execute the following command:
tar -xzf pycharm-community-2021.3.3.tar.gz -C ~/
Extract the PyCharm compressed package.
Then continue entering the command in the terminal to add PyCharm to the system environment and refresh the environment variables.
echo 'export PATH="$HOME/pycharm-community-2021.3.3/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
-
PyCharm has now been successfully installed. The terminal can then be used to enter the pycharm-community-2021.3.3/bin.
The actual path of the PyCharm folder should be used here.
cd ~/pycharm-community-2021.3.3/bin
Then run the command to launch PyCharm:
./pycharm.sh
When this interface appears, it indicates that PyCharm has started successfully. Continue learning according to the tutorial.