全程离线操作python环境打包及恢复
环境打包
| 1 2 3 4 5 6 7 8 9 | set req=..\req_pkg_py_env.txtset whs=..\wheelspip freeze >%req%pip wheeel -r %req% -w %whs%pip wheeel pip -w %whs%pip wheeel setuptools -w %whs%pip wheeel wheeel -w %whs%pip uninstall -r %req% -ypause |
环境恢复
| 1 2 3 4 5 6 | set req=..\req_pkg_py_env.txtset whs=..\wheelsset get-pip=..\get-pip.pypython %get-pip% --no-index --find-links=%whs%pip install -r %req% --no-index --find-links=%whs%pause |
环境变量配置
| 1 2 3 4 5 6 | @echo offset PYTHONHOME=%cd%set PATH=%PYTHONHOME%/Scripts;%PYTHONHOME%;%PATH% set PYTHONPATH=%PYTHONHOME%/Libtitle %PYTHONHOME%\python.execall cmd |
get-pip.py文件来自:https://bootstrap.pypa.io/get-pip.py


共有 0 条评论