Python Forum
Installation of packages to newest Python version from previous one
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installation of packages to newest Python version from previous one
#2
(Jul-15-2023, 07:21 AM)Andrzej_Andrzej Wrote: Is it possible to check what python packages are installed let's say into my present 3.10.3 version
and get that list and somehow install it to 3.11 version all together
Yes there is but i would not requirement it all for main Python version more for virtual environment.
Talking about to use of pip list and pip freeze to a requirements.txt.
By your previous post you use Windows,if Python 3.11 is in you OS Path for Windows use this to list what install to 3.10.
# list all installed to 3.10
py -3.10 -m pip list 

# 3.11 if that in OS path
pip list

# Or
py -m pip list
If freeze to requirements.txt that can install that 3.11,but would not recommend this at all.
See that it freeze to version when was installed,and don't consider newer versions.
py -3.10 -m pip freeze > requirements.txt
# Install to 3.11,but no no
pip install -r requirements.txt

So what to do?
Just install manually can use pip list as refences,or something like pip-chill.
Learn to use virtual environment if have a project that have many dependencies.
Eg install 3 or more packages would be like this,here in virtual environment.
(new_env) G:\div_code\new_env
λ pip install requests pip-chill click
.....
Successfully installed click-8.1.5 requests-2.31.0 colorama-0.4.6 pip-chill-1.0.3
# Or if put same packages a req.txt,and use this file to install
pip install -r req.txt
Requirement already satisfied: requests in g:\div_code\new_env\lib\site-packages (from -r req.txt (line 1)) (2.31.0)
.....
Reply


Messages In This Thread
RE: Installation of packages to newest Python version from previous one - by snippsat - Jul-15-2023, 10:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  run part of a script with a different version of Python jdog 2 503 Jan-09-2024, 08:49 PM
Last Post: jdog
  How to find out from outside Python (in Windows) the current version of Python? pstein 4 822 Oct-04-2023, 10:01 AM
Last Post: snippsat
  Python installation for old MacOS Yonix 1 544 Sep-21-2023, 03:32 PM
Last Post: menator01
  Installing python packages in a virtual environment Led_Zeppelin 1 819 Aug-15-2023, 08:18 PM
Last Post: deanhystad
  How to resolve version conflicts in Python? taeefnajib 0 972 Apr-27-2023, 08:37 PM
Last Post: taeefnajib
  How to see the date of installation of python modules. newbieAuggie2019 4 1,724 Mar-31-2023, 12:40 PM
Last Post: newbieAuggie2019
  Getting "SSL client not supported by this Python installation" error prabirsarkar 0 993 Mar-13-2023, 05:01 PM
Last Post: prabirsarkar
  Python venv and PIP version issue JanOlvegg 2 1,336 Feb-22-2023, 02:22 AM
Last Post: JanOlvegg
  Python Version upgrade nitinkukreja 1 944 Feb-04-2023, 10:27 PM
Last Post: Larz60+
  python installation/running inside singularity container erdemath 2 1,877 Sep-21-2022, 08:13 AM
Last Post: erdemath

Forum Jump:

User Panel Messages

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