Windows 重装系统后复用上个系统的 Python

您所在的位置:网站首页 系统重装后怎么装软件 Windows 重装系统后复用上个系统的 Python

Windows 重装系统后复用上个系统的 Python

2023-09-27 11:27| 来源: 网络整理| 查看: 265

固态硬盘是真的香,然而重装系统以后,各种问题就接踵而至了!比如说你原先安装了好几十个依赖包的 Python,你真的舍得放弃吗?(关键有些包安装真的是难呀!宝宝苦,但宝宝不说)。

当然,前提是你原先的 Python 没有安装在C盘,如果有,请出门左拐!!!

其实,如果没有安装在C盘的话,即使重新安装系统,Python还是可以正常使用的,只不过是重新添加设置一下环境变量而已。当然,IDEL好像是用不了,毕竟重装以后,注册表啥的已经不见了,没有正常进入IDEL的接口。

                

为了可以让之前Python安装的依赖包继续使用,而且还可以继续正常使用IDEL,我只好动个偷奸耍滑的歪脑筋了。

我原来Python的安装位置在:D:\Program Files\Python36,因为重装系统只清空了C盘,所以这个路径下的东西都在。因此,你只需要把这个目录的名字 Python36 修改一下,改成其他什么名字都可以,不妨改成 Bak。然后重新运行 python-3.6.0-amd64.exe安装Python,而且路径仍然位于你之前Python的安装路径 D:\Program Files\Python36下,安装好以后,删除这个Python36目录,将原来的 Bak 修改回 Python36 目录。然后手动添加路径 D:\Program Files\Python36 和 D:\Program Files\Python36\Scripts到环境变量,如此,便大功告成!

当然,我重装系统之前用 pip3 安装的依赖包也都还在:

C:\Windows\System32>pip3 list Package Version ------------------------- ----------- -upyter-core 4.6.3 2to3 1.0 absl-py 0.7.1 aiohttp 3.3.2 alembic 0.9.3 algorecord 0.1.0 alibabacloud-nls-java-sdk 2.0.0 aliyun-python-sdk-core 2.13.3 altgraph 0.16.1 appdirs 1.4.3 APScheduler 3.5.1 asn1crypto 0.24.0 astor 0.7.1 async-timeout 3.0.0 atomicwrites 1.2.1 attrs 18.1.0 audioread 2.1.6 autocorrect 0.3.0 Automat 20.2.0 backcall 0.1.0 baidu-aip 2.0.0.1 bcrypt 3.1.7 beautifulsoup4 4.5.3 bleach 2.0.0 blinker 1.4 boto 2.49.0 boto3 1.9.130 botocore 1.12.130 bottle 0.12.15 bottle-websocket 0.2.9 bs4 0.0.1 bz2file 0.98 captcha 0.3 certifi 2018.4.16 cffi 1.11.5 chardet 3.0.4 click 6.7 client 0.0.1 cmake 3.15.3 colorama 0.4.1 configparser 3.7.4 constantly 15.1.0 croniter 0.3.24 cryptography 2.9.2 cssselect 1.0.3 cycler 0.10.0 Cython 0.29.6 DBUtils 1.3 decorator 4.3.0 defusedxml 0.6.0 dill 0.2.8.2 Django 2.1.8 django-excel 0.0.10 dlib 19.7.0 docopt 0.6.2 docutils 0.14 dominate 2.3.1 Eel 0.9.10 entrypoints 0.3 et-xmlfile 1.0.1 face-recognition 1.2.3 face-recognition-models 0.3.0 fake-useragent 0.1.11 Faker 0.8.17 fasttext 0.8.3 Flask 0.12.2 Flask-Admin 1.4.1 Flask-APScheduler 1.8.0 Flask-Bootstrap 3.3.7.1 Flask-Cache 0.13.1 Flask-HTTPAuth 3.2.3 Flask-Login 0.4.0 Flask-Mail 0.9.1 Flask-Migrate 2.0.4 Flask-Moment 0.5.1 Flask-PageDown 0.2.2 Flask-Script 2.0.6 Flask-SocketIO 4.1.0 Flask-SQLAlchemy 2.2 Flask-SSLify 0.1.5 flask-swagger 0.2.13 funcsigs 1.0.0 future 0.15.2 gast 0.2.2 gensim 3.7.1 gevent 1.3.7 gevent-websocket 0.10.1 gitdb2 2.0.3 GitPython 2.1.10 greenlet 0.4.15 grpcio 1.20.0 gunicorn 19.7.1 h5py 2.9.0 html5lib 0.999999999 hyperlink 19.0.0 idna 2.6 idna-ssl 1.1.0 imageio 2.5.0 importlib-metadata 1.6.0 incremental 17.5.0 ipykernel 5.2.1 ipython 7.13.0 ipython-genutils 0.2.0 ipywidgets 7.5.1 itchat 1.3.10 itsdangerous 0.24 jdcal 1.4 jedi 0.17.0 jieba 0.39 Jinja2 2.9.6 jmespath 0.9.4 joblib 0.13.0 JPype1 0.7.0 jsonschema 3.2.0 Keras 2.2.4 Keras-Applications 1.0.7 keras-contrib 2.0.8 Keras-Preprocessing 1.0.9 kiwisolver 1.0.1 librosa 0.6.2 llvmlite 0.26.0 lml 0.0.9 lxml 4.2.5 Mako 1.0.7 Markdown 2.6.8 MarkupSafe 1.0 matplotlib 2.2.3 meld3 1.0.2 mistune 0.8.4 mock 2.0.0 more-itertools 4.3.0 MouseInfo 0.1.2 multidict 4.3.1 mysql-connector-python 8.0.11 mysqlclient 1.3.10 nbconvert 5.6.1 nbformat 5.0.6 nltk 3.3 notebook 6.0.3 ntplib 0.3.3 numba 0.41.0 numpy 1.16.3 opencv-python 4.1.1.26 OpenNMT-tf 1.22.1 openpyxl 2.5.14 ordereddict 1.1 pandas 0.22.0 pandocfilters 1.4.2 paramiko 2.7.1 parse 1.9.0 parso 0.7.0 pbr 5.1.3 pefile 2019.4.18 phone 0.4.1 pickleshare 0.7.5 Pillow 6.0.0 pinyin 0.4.0 pip 19.3.1 plac 0.9.6 pluggy 0.8.0 pocketsphinx 0.1.15 pqi 2.0.6 prettytable 0.7.2 prometheus-client 0.7.1 prompt-toolkit 3.0.3 protobuf 3.6.0 psutil 5.6.3 psycopg2 2.7.3 py 1.7.0 py-mysql 1.0 PyAudio 0.2.11 PyAutoGUI 0.9.48 pycparser 2.18 pycryptodome 3.8.2 pyecharts 1.7.1 pyee 5.0.0 pyexcel 0.5.14 pyexcel-io 0.5.18 pyexcel-webio 0.1.4 pyexcel-xlsx 0.5.7 pygame 1.9.6 PyGetWindow 0.0.8 Pygments 2.6.1 PyHamcrest 2.0.2 pyhanlp 0.1.48 pyinstaller 3.6 PyMsgBox 1.0.7 PyMySQL 0.9.2 PyNaCl 1.3.0 pyparsing 2.2.0 pyperclip 1.7.0 pypinyin 0.33.2 pypiwin32 223 pypng 0.0.18 pyppeteer 0.0.25 PyPrind 2.11.2 PyQRCode 1.2.1 pyquery 1.4.0 pyreadline 2.1 PyRect 0.1.4 pyrsistent 0.16.0 PyScreeze 0.1.25 pytesseract 0.3.1 pytest 4.0.1 python-dateutil 2.6.1 python-dotenv 0.6.5 python-editor 1.0.3 python-engineio 3.8.2.post1 python-Levenshtein 0.12.0 python-socketio 4.2.0 PyTweening 1.0.3 pytz 2018.5 pywin32 224 pywin32-ctypes 0.2.0 pywinpty 0.5.7 PyYAML 5.1.1 pyzmq 19.0.0 qrcode 6.1 qtconsole 4.7.3 QtPy 1.9.0 redis 2.10.6 requests 2.18.4 resampy 0.2.1 rouge 0.3.1 s3transfer 0.2.0 sacrebleu 1.3.2 scikit-learn 0.20.0 scipy 1.1.0 selenium 3.11.0 Send2Trash 1.5.0 setuptools 33.1.1 simplejson 3.17.0 six 1.10.0 sklearn 0.0 smart-open 1.8.0 smmap2 2.0.3 SpeechRecognition 3.8.1 SQLAlchemy 1.3.16 sqlparse 0.3.0 suds 0.4 suds-jurko 0.6 tencentcloud-sdk-python 3.0.88 tensorboard 1.13.1 tensorflow 1.13.1 tensorflow-estimator 1.13.0 termcolor 1.1.0 terminado 0.8.3 testpath 0.4.4 text-unidecode 1.2 texttable 1.6.2 tornado 6.0.4 tqdm 4.28.1 traitlets 4.3.3 Twisted 19.10.0 typing 3.6.6 tzlocal 1.5.1 urllib3 1.22 urlopen 1.0.0 virtualenv 16.0.0 virtualenvwrapper-win 1.2.5 visitor 0.1.3 w3lib 1.19.0 wcwidth 0.1.9 webencodings 0.5.1 websocket-client 0.56.0 websockets 7.0 weixin-python 0.5.5 Werkzeug 0.12.2 wheel 0.33.1 whichcraft 0.5.2 widgetsnbextension 3.5.1 wordcloud 1.5.0 workbook 1.1 wrapcache 1.0.8 WTForms 2.1 xgboost 0.81 xlrd 1.1.0 XlsxWriter 1.0.5 xlutils 2.0.0 xlwt 1.3.0 xpinyin 0.5.6 yarg 0.1.9 yarl 1.2.6 zipp 3.1.0 zipstream 1.1.4 zope.interface 4.7.2 WARNING: You are using pip version 19.3.1; however, version 20.1.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

 看到这一串,相信你应该就明白我为什么不想再重新安装新的Python环境了!!!



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3