Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New Version Problem
#1
Want to find a way to move all modules from old version of python to new version without have install all again.

Thanks in advance Smile
Reply
#2
what is:
  • Old version
  • New version
need version numbers from --> to
Reply
#3
pip freeze can be dumped into a requirements.txt file and used later to re-construct the frozen environment.
pip freeze > frozen-requirements.txt
Then:
pip install -r frozen-requirements.txt
This make same 3-party dependencies installed as you had in the original environment where you generated the frozen-requirements.txt.

pip make easy now so don't need to worry so much about this,
it's also common to start from scratch in a virtual environment(build into Python venv)
Then install dependencies needed for the project.
Reply
#4
python 3.6.6 to 3.8.1
Reply
#5
(Jan-08-2020, 05:46 PM)SamIam Wrote: python 3.6.6 to 3.8.1
Are you familiar with pip and is that what you used to installed with?
Then it work as i posted.
So can do it like this,this bypass any settings in Windows environment Path.
c:\python36\Scripts
# See that point to 3.6
λ pip -V
pip 10.0.1 from c:\python36\lib\site-packages\pip (python 3.6)

c:\python36\Scripts
λ pip freeze
allure-pytest==2.3.4b1
allure-python-commons==2.3.4b1
altgraph==0.15 
.....

# Write to file
pip freeze > frozen-requirements.txt
Copy frozen-requirements.txt to Scripts folder of 3.8
Then do:
c:\Python38\Scripts
# See that point to 3.8
λ pip -V
pip 19.3.1 from c:\python38\lib\site-packages\pip (python 3.8)

# Install all 3.6 3-party modules
c:\Python38\Scripts
λ pip install -r frozen-requirements.txt
As a note so do i use cmder,the command used work just the same in cmd.
Reply
#6
Thank you
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can I upload a new version without previously deleting ancient version sylas 6 4,184 Nov-08-2017, 03:26 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020