Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

Problems with Python 3.9 installation

I'm quite new to all of this programming universe. I recently installed the latest version of python (3.9.1 from a tar.gz) so I configured vscode to use that one, when I run any scripts in it without debugging, it shows the following error in the last line of Traceback:

ModuleNotFoundError: No module named '_ctypes'

I just ignored it because I realized that when I change to pyhton 3.9 vs code shows a message "Linter pylint is not installed" excepting to fix the problem I select install but then it tells me that pip module is not builtin in python 3.9, I run in the python interpreter:

>>> import pip
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pip'

I run the same script in other python interpreter (3.8) that came with the OS without any issues. Then I decided to install pip with the get-pip.py method BUT then it tells me that zlib module is not there:

Traceback (most recent call last):
  File "<frozen zipimport>", line 520, in _get_decompress_func
ModuleNotFoundError: No module named 'zlib'

If I run get-pip.py with python3.8 and it completes the task successfully.

Can somebody guide me? I'm feeling like giving up and just use python3.8 but I really wanna overcome this issue. For some reason that I don't understand my python 3.9 installation seems to be messed up and I followed the readme instructions.

PD: I use Linux Mint 20.1


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I just reinstalled python with the file provided by the website in this link as suggested in the comments.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...