-
Notifications
You must be signed in to change notification settings - Fork 4
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
[BUG] If PyQt5 is in your environment, recOrder will use it (causing GUI checkboxes to fail) #409
Comments
Easiest way to ensure: try:
import PyQt5
raise RuntimeError(...)
except ImportError:
try:
import PySide2
raise RuntimeError(...)
except ImportError:
pass # all good However I'm not aware of an automatic way to uninstall the old one through dependency management, since they are different packages (on purpose). |
Can we do something like ... #logic to list the packages we don't want
packages_to_uninstall = ['package_to_uninstall1', 'package_to_uninstall2']
for package in packages_to_uninstall:
subprocess.run(['pip', 'uninstall', package, '-y']) maybe this is not ideal for users if they have other stuff that depends on pyqt5.. |
Then you would also need to account for the whole pip/conda/mamba/poetry/venv/pyenv/apt/pacman/yum/... situation |
@ziw-liu would that snippet need to appear every time we import From Do you think this one-line addition would work? Where should this line live? |
Not sure if it will work everywhere (especially Windows) and we need to test this. But if it works, it could be added to the top-level |
@edyoshikun and I tested a
pip install -e .
installation into an existing environment and we ran into Qt bugs.We found that the
pip install -e .
did not uninstall PyQt5, so recOrder was using that.@ziw-liu is there a way to ensure that a package is not in an environment? If not, we should do fresh conda environments on all of our computers and make sure that PyQt5 is not in our environments.
The text was updated successfully, but these errors were encountered: