Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python library loss after update python version. #3595

Closed
zhangzhishan opened this issue Aug 15, 2019 · 8 comments
Closed

Python library loss after update python version. #3595

zhangzhishan opened this issue Aug 15, 2019 · 8 comments

Comments

@zhangzhishan
Copy link

After update python version, the original library installed by pip is located in the old version folder. It can not be used directly through command line.

@copdips
Copy link
Contributor

copdips commented Aug 30, 2019

just reinstall them by pip install ?

@Deide
Copy link

Deide commented Aug 30, 2019

One option is to make use of some virtualenv/venv

@thorstenkampe
Copy link

I don't understand why the Scoop mechanism for persisting data is not used. Is the package maintainer aware of this mechanism?

@zhoujin7
Copy link

I don't understand why the Scoop mechanism for persisting data is not used. Is the package maintainer aware of this mechanism?

After upgrading python, there is no guarantee that the previously installed libraries are still compatible. It is best to reinstall them.

@thorstenkampe
Copy link

A minor upgrade - say from 3.8.0 to 3.8.1 - is always compatible. Only a major upgrade - say from 3.7 to 3.8 - will affect libraries which have a binary component (pyd files).

Not persisting site-packages at all is the worst option. If I reinstall Python (scoop update --force) or uninstall the old Python (scoop cleanup python) ALL packages will be gone! How do I reinstall packages that have been deleted without a trace?

@zhoujin7
Copy link

zhoujin7 commented Jun 12, 2020

A minor upgrade - say from 3.8.0 to 3.8.1 - is always compatible. Only a major upgrade - say from 3.7 to 3.8 - will affect libraries which have a binary component (pyd files).

Not persisting site-packages at all is the worst option. If I reinstall Python (scoop update --force) or uninstall the old Python (scoop cleanup python) ALL packages will be gone! How do I reinstall packages that have been deleted without a trace?

It is not always compatible, even if a minor upgrade, some libraries is not pure python.
You can install multiple versions at the same time and use virtualenv, such as venv.
Write a new application, usually using a fixed python version.

@zanglg
Copy link

zanglg commented Nov 16, 2020

maybe persisting a site-packages folder with python version is a good solution, like: persist/python3.9/site-packages

@Cologler
Copy link

A minor upgrade - say from 3.8.0 to 3.8.1 - is always compatible. Only a major upgrade - say from 3.7 to 3.8 - will affect libraries which have a binary component (pyd files).

Not persisting site-packages at all is the worst option. If I reinstall Python (scoop update --force) or uninstall the old Python (scoop cleanup python) ALL packages will be gone! How do I reinstall packages that have been deleted without a trace?

You should install packages in user site: pip install --user ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants