-
Notifications
You must be signed in to change notification settings - Fork 224
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
Problems caused by different in package name in Pip (pyqt vs PyQt5) #1554
Comments
I don't think we're going to change this package name. Some reasons:
|
Solution for you: create conda packages for your projects and their dependencies instead of trying to use wheels in conda. Although conda and pip work well most of time, they are not totally compatible, specially regarding packages with compiled libraries. You can use conda-forge for that, as most people do these days. |
Making this the general rule would preclude having sensible package names for packages that are not based on CPython. Personally, I would name all of those ones as |
Does this mean it is not possible at all to use versions of PyQt later than the version available via conda? If so, that doesn't seem like a real solution. |
Of course it's possible. What it's not possible is for packages to depend on conda and pip PyQt5 packages at the same time. You have to depend on one or the other. |
Cordoba, thanks again for your response. The reason @BrenBarn asks is that I was trying to help him on Stack Overflow here. Maybe I misunderstood your replies so perhaps you can answer some questions I have. What will happen if you install PyQt twice in one environment, once with
Is this supposed to work? If so, which version of PyQt is used then? |
I haven't done it but I guess things will break horribly because conda packages and pip wheels have very different build requirements. So, this is a situation you can't have: you can either install PyQt5 conda packages or its pip wheels, but not both at the same time. |
Conda provides the ability to have separate environments due to issues of needing to use conflicting packages. You must keep them separate, otherwise to which one would you expect an |
Indeed. So I did understand this correctly. My concern is that, once you have made a choice for your environment (pip or conda for PyQt), you must be very careful not to mix them. You can accidentally install a package that depends on PyQt and installs it the other way (because it doesn't recognize the existing installation). Also, I see on Stack Overflow people like @BrenBarn installing PyQt with My main concern is that, once you have installed PyQt with Do you share these concerns? |
I do not know the full details of how |
It sounds like my issue is slightly different than what titusjan is reporting so maybe I'll open a separate issue. For me, pip-installing PyQt5 in an environment does not appear to break other environments (although it does break the environment where you do it). But pip-installing PyQt5 in the root environment seems to break other environments. |
Would it be possible to create a dummy conda-package named |
I'll just add a note here, that I think in general perhaps pip and non-official channels (even conda-forge) should be prohibited from working in the conda root environment. I've told my team not to install anything untrusted into the root conda env and to treat it the same way you would |
Sorry just seeing this. My guess at what's going on here is that pip doesn't sever inodes before clobbering paths that exist in a prefix, and in that case it affects conda's underlying mechanism of hard-linking inodes into a prefix after a package is extracted into the package cache. So pip then alters every conda environment that shares that package. Definitely a known issue, but one that we can't fix with conda. It's on our TODO list to patch pip (the conda-installed one) to prevent pip from behaving badly here, and then submit that patch upstream. Haven't gotten there yet though. |
I also very much support that sentiment. Conda environments solve a lot of problems. They're there to use. Not a bad idea to treat the root conda environment just like your system python, i.e. "leave the system python alone" == "leave the root conda environment alone". We hope to fix this for everyone someday with conda/conda#3912 |
One of the things I like about Anaconda is that it works well together with Pip. If a package is not available in Anaconda I can fall back on installation from PyPi. However, this does not work for PyQt because the package name in Anaconda is
pyqt
, but on PyPi it isPyQt5
.For me, as a developer of packages that use PyQt, this means that I can not add
PyQt5
to theinstall_requires
parameter in thesetup.py
of my package. If I do, and a user installs my package with Pip, it doesn't recognize thatpyqt
has already been installed with Anaconda. It will then downloadPyQt5
from PyPi and install it over thepyqt
package. This breaks the installation of other environments beyond repair. The user will get a segmentation fault if a program tries to import PyQt!Please rename the
pyqt
package toPyQt5
(I don't know if case-sensitivity matters). In general please use the default package name as it is defined in thesetup.py
. I realize that this has a lot of impact, if it is possible at all. However, I think it should at leat be discussed (I could not find anything on this with Google).To repeat the problem you can install
PyQtChart
, which automatically installs PyQt5. I accidentally did this and now my PyQt broken for all environments that use the same Python version (any help on fixing that would be appreciated as well).Like I said. I haven't managed to fix the issue. Removing PyQt with pip and reinstalling with conda didn't help. Luckily my PyQt from Python 3.6 still works but all 3.5 PyQt installations are broken. I use OS-X 10.11.5. Help on how to repair it is appreciated.
The text was updated successfully, but these errors were encountered: