User Tools

Site Tools


Sidebar

Go Back

Refresh

You are not allowed to add pages

Direct Link

library:python:installpython3.8.2onwindows7

Install Python 3.8.2 for Windows 7


1. Install Package

1.1 Download installation package.

1.2 Install the software

you can:
Change the installation directory and chose some modules you like.

But, If you change de default installation directory, the following step 2.1 must be done.

After the installation finished, you can check it by run command : python -V

D:\Python38>python -V
Python 3.8.2

If there is something wrong with the PATH, you should set the PATH. or you can create a bat file with these commands.

PATH = D:\Python38;D:\Python38\Scripts

Everytime you open a new command console, run this bat file first.

1.3 Modify the site.py to configure pip environment

To check configuration, use command python -m site

D:\Python38>python -m site
sys.path = [
  'D:\\Python38',
  'D:\\Python38\\python38.zip',
  'D:\\Python38\\DLLs',
  'D:\\Python38\\lib',
  'D:\\Python38\\lib\\site-packages',
]
USER_BASE: 'C:\\Users\\xxx\\AppData\\Roaming\\Python' (doesn't exist)
USER_SITE: 'C:\\Users\\xxx\\AppData\\Roaming\\Python\\Python38\\site-packages' (doesn't exist)
ENABLE_USER_SITE: True

It shows that USER_BASE and USER_SITE are error. modify file D:\Python38\Lib\site.py, change these two parameter to

USER_SITE = "D:\Python38\Lib\site-packages"
USER_BASE = "D:\Python38\Scripts"

check again: python -m site

1.4 Reinstall pip

python -m pip install --upgrade pip --force-reinstall

check pip by :

D:\Python38>pip -V
pip 20.0.2 from D:\Python38\Lib\site-packages\pip (python 3.8)     

2. Embed Package

2.1 Download Zip package and unzip

2.2 修改python38._pth

去掉#import site 前面的 “#” 注释

2.3 安装pip

Apendix

3. For Python 3.8.8

just install, revise the site.py and upgrede pip with:

python -m pip install --upgrade pip


-i https://pypi.tuna.tsinghua.edu.cn/simple
library/python/installpython3.8.2onwindows7.txt · Last modified: 2022/05/02 00:32 (external edit)