本帖最后由 thirtyyears 于 2021-5-26 23:21 编辑
打包
[Shell] 纯文本查看 复制代码 set req=..\req_pkg_py_env.txt
set whs=..\wheels
pip freeze >%req%
pip wheel -r %req% -w %whs%
pip wheel pip -w %whs%
pip wheel setuptools -w %whs%
pip wheel wheel -w %whs%
pip uninstall -r %req% -y
pause
恢复
[Shell] 纯文本查看 复制代码 set req=..\req_pkg_py_env.txt
set whs=..\wheels
set get-pip=..\get-pip.py
python %get-pip% --no-index --find-links=%whs%
pip install -r %req% --no-index --find-links=%whs%
pause
环境变量配置
[Shell] 纯文本查看 复制代码 @echo off
set PYTHONHOME=%cd%
set PATH=%PYTHONHOME%/Scripts;%PYTHONHOME%;%PATH%
set PYTHONPATH=%PYTHONHOME%/Lib
title %PYTHONHOME%\python.exe
call cmd
get-pip.py文件来自:https://bootstrap.pypa.io/get-pip.py
python37._pth注意修改
[Shell] 纯文本查看 复制代码 python37.zip
.
# Uncomment to run site.main() automatically
import site
|