Install pugdebug

Lezsák Domonkos edited this page Jun 24, 2017 · 12 revisions
Clone this wiki locally

This page should describe installing the requirements and setting up the environment to run pugdebug from the source code.

Installing development version on Fedora new way

NOTE: This is for Fedora 25. I haven't been working much on pugdebug in 2016, so I have no idea what's the
process for F23 or F24. But those are dated versions anyway.

NOTE 2: Fedora 25 comes with Python 3.5 out of the box, so I'm switching to that from Python 3.4.
That shouldn't cause too much troubles (famous last words).

The following sub-sections describes how to install all the requirements that are needed to run the development version of pugdebug on a Fedora system.

Install git

If you don't have it already, install git

sudo dnf install git

Install development dependencies

sudo dnf install gcc gcc-c++ python3-devel qt5-qtbase qt5-qtbase-devel

Clone pugdebug

Clone pugdebug using git:

git clone https://github.com/robertbasic/pugdebug.git

Create a virtual environment

Go to the directory where you cloned pugdebug and create a virtual environment:

virtualenv --python=python3.5 env

Install pugdebug requirements

NOTE: This step needs to be done with the virtual environment activated
pip install -r requirements.txt

This should install sip and PyQt5 as well.

Start pugdebug

After all this, you should be able to start the development version of pugdebug.

Navigate to the directory where pugdebug is cloned and run:

python app.py

pugdebug should start.

Installing development version on Fedora old way

NOTE: This is for Fedora 21. I'm not sure yet how much it differs for Fedora 22, as F22 has a new package manager, DNF. I believe using `dnf` instead of `yum` in the commands bellow should be the only difference.

The following sub-sections describes how to install all the requirements that are needed to run the development version of pugdebug on a Fedora system.

Install git

If you don't have it already, install git

sudo yum install git

Install development dependencies

Fedora 22:

sudo yum install gcc gcc-c++ python3-devel qt5-qtbase qt5-qtbase-devel

Fedora 21:

sudo yum install gcc gcc-c++ python3-devel qt5-base qt5-base-devel

Clone pugdebug

Clone pugdebug using git:

git clone https://github.com/robertbasic/pugdebug.git

Create a virtual environment

Go to the directory where you cloned pugdebug and create a virtual environment:

virtualenv --python=python3.4 env

Activate the virtual environment

source env/bin/activate

Install SIP

NOTE: This step needs to be done with the virtual environment activated
wget http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.5/sip-4.16.5.tar.gz  
tar xzf sip-4.16.5.tar.gz  
cd sip-4.16.5  
python configure.py  
make  
sudo make install  
cd ..  
rm -r sip-4.16.5*

Instal PyQt5.4

NOTE: This step needs to be done with the virtual environment activated
wget http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.4/PyQt-gpl-5.4.tar.gz  
tar xzf PyQt-gpl-5.4.tar.gz  
cd PyQt-gpl-5.4  
python configure.py --qmake="/usr/bin/qmake-qt5"
make  
make install  
cd ..  
rm -r PyQt-gpl-54*

Install pugdebug requirements

NOTE: This step needs to be done with the virtual environment activated
pip install -r requirements.txt

Start pugdebug

After all this, you should be able to start the development version of pugdebug.

Navigate to the directory where pugdebug is cloned and run:

python app.py

pugdebug should start.

Installing development version on Ubuntu

The following sub-sections describes how to install all the requirements that are needed to run the development version of pugdebug on a Ubuntu system.

Install git

If you don't have it already, install git

sudo apt-get install git

Install development dependencies

sudo apt-get install build-essential libgl1-mesa-dev python-virtualenv

Maybe you have to install the regular virtualenv and/or python3-dev too:

sudo apt-get install virtualenv python3-dev

Install Qt5

Download the Qt5 installer from http://www.qt.io/download-open-source/

Make the downloaded .run file executable and run it.

The installer will ask you to create an account on Qt's website, you can skip that.

Choose path where you want to install Qt.

At the step where choosing what components to install, pick Qt5.4, source components, essentials. Feel free to uncheck the preselected android stuff and the QtExtras.

After some time Qt5.4 should be installed at the path you specified.

Clone pugdebug

Clone pugdebug using git:

git clone https://github.com/robertbasic/pugdebug.git

Create a virtual environment

Go to the directory where you cloned pugdebug and create a virtual environment:

virtualenv --python=python3.4 env

Activate the virtual environment

source env/bin/activate

Install SIP

NOTE: This step needs to be done with the virtual environment activated
wget http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.5/sip-4.16.5.tar.gz  
tar xzf sip-4.16.5.tar.gz  
cd sip-4.16.5  
python configure.py  
make  
sudo make install  
cd ..  
rm -r sip-4.16.5*

Instal PyQt5.4

NOTE: This step needs to be done with the virtual environment activated
wget http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.4/PyQt-gpl-5.4.tar.gz  
tar xzf PyQt-gpl-5.4.tar.gz  
cd PyQt-gpl-5.4  
python configure.py --qmake="/path/to/Qt/5.4/gcc_64/bin/qmake"
make  
make install  
cd ..  
rm -r PyQt-gpl-54*

Install pugdebug requirements

NOTE: This step needs to be done with the virtual environment activated
pip install -r requirements.txt

Start pugdebug

After all this, you should be able to start the development version of pugdebug.

Navigate to the directory where pugdebug is cloned and run:

python app.py

pugdebug should start.

Installing development version on Windows

The following sub-sections describes how to install all the requirements that are needed to run the development version of pugdebug on a Windows system.

Install git

Download and install git from: https://git-scm.com/download/win

Install Python 3.4

Download and install Python 3.4.latest for windows from: https://www.python.org/downloads/

Make sure to install the 64bit version of Python 3.4!

Install using default options. Add python to your PATH, following the directions given in the Python documentation https://docs.python.org/3.4/using/windows.html#setting-envvars

Add C:\Python34;C:\Python34\Scripts to your PATH.

Install PyQt5.4

Download and install binary packages for Windows from: http://www.riverbankcomputing.com/software/pyqt/download5

Clone pugdebug

Start git bash, and clone pugdebug:

git clone https://github.com/robertbasic/pugdebug.git

Install pugdebug requirements

Navigate to the directory where you cloned pugdebug and run:

pip install -r requirements.txt

Start pugdebug

After all this, you should be able to start the development version of pugdebug.

Navigate to the directory where pugdebug is cloned and run:

python app.py

pugdebug should start.

Building Windows binaries

If you want to build binaries for pugdebug.

Download and install pywin32 from http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/

Make sure to download pywin32 for Python 3.4, 64bit version.

Download the python3 branch of pyinstaller https://github.com/pyinstaller/pyinstaller/tree/python3

Extract the ZIP file.

In command prompt, navigate where pyinstaller is unzipped and run:

python setup.py install

Navigate where pugdebug is cloned and run:

pyinstaller --clean --hidden-import=sip --onefile --windowed --name=pugdebug app.py

Under the new dist directory there should be a pugdebug.exe file.

Installing development version on OSX

Easiest way to install dependencies on OS X is to use Homebrew. To install the dependencies, execute the following commands from your terminal:

brew install python3
brew install qt5 pyqt5 sip

An alternate way of installing was reported for OSX:

brew install python3
brew install qt5 pyqt5 sip --with-python3
PYTHONPATH=/usr/local/lib/python3.4/site-packages/
pip3 install Pygments
python3 app.py

Go to directory where you checked out the pugdebug, and execute

python3 app.py

At the moment, there seems to be an issue with using virtualenv, python3 and pyqt5 on OS X Yosemite.