Pip install PyQt5 in conda env breaks Anaconda

Hi all,

I started with the book about a week ago and am really enjoying all the new insight I’m getting. I noticed one issue with the installation instructions. For people like me going the conda route over the pure python to install the virtual env for the project I believe there might be an issue if we aren’t careful.

If one installs pyqt5 and it’s related packages using pip rather than conda, this will break the Anaconda installation and Apps like Spyder, Anaconda Navigator will stop working. Might be worth issuing a warning to the reader about this known problem with using conda and pip in the same env.

Another problem I noticed is with yaml, using python 3.7 in the virtual env I installed the latest yaml and it could not load numpy arrays. I downgraded yaml to v3.2 and it worked!

Just posting here if others might find it useful.

Thanks for pointing this out! I’ll check your suggestions and update the book accordingly.

Indeed, mixing conda and pip is generally not a good idea unless you know what you are doing. I was sure I added a warning regarding the creation of environments, but maybe I am mistaken. Hope you managed to get your programs back without too many delays!

1 Like

Hi Acquiles,

You do have a warning in the book.

In fact there are separate sections showing step by step instructions for conda and pure python.

I went the conda route and tried to install all packages using conda install at first but it could not install pyqt5 completely. I then used pip and it broke my Anaconda. (Everything still works in CLI)

A bit of googling around showed me that was a big blunder.

The only way out now is to strip my PC off of any trace of Anaconda and start over. This isn’t something I can do right away so for now I have parted ways with spyder IDE for now.

Apparently the conflict with pip and conda re. pyqt5 is well known, so thought that should be an explicit warning in the book as I did not know about it :slightly_smiling_face: