(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)
.....