Skip to content

pranavsenthil5/Learning-PyQt5

Repository files navigation

Compilation of my Learnings in PyQt5

Setup and Installation Process

  1. Created a virtual environment in my project folder and activated it.
python3 -m venv venv
# The last argument is the path to the virtual environment

source venv/bin/activate
  1. Updated pip
python3 -m pip install --upgrade pip
  1. Tried installing PyQt5 in virtual environment and failed

[ If it works you are good to go ]

pip install pyqt5

Some people also had the same issue, so I tried following the steps on Stack Overflow and a billion other sites but they all failed.

I also tried this: I installed qt globally on my mac using homebrew, added the path to qmake in environment variables and tried installing pyqt5 again in the virtual environment. But, the last step failed.

brew install qt5
echo 'export PATH="/usr/local/opt/qt/bin:$PATH"' >> ~/.zshrc

Building pyqt5 might have been another option but I didn't want to get into that.

  1. Installed pyqt5 globally using homebrew (the previous step is needed for this)
brew install pyqt@5

Although it beats the point of virtual environments, I found this to be the only way.

  1. Allowed the virtual environment to access global packages (Stack Overflow)
python3 -m venv --system-site-packages venv

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published