This page is for Microsoft Windows users who want to contribute to the development of MusicBrainz Picard or for other reasons want to be able to run Picard from source code. It explains how to install the 3rd party software needed to run from source and also to build the Picard for Windows installer executable.
Install GitHub Desktop or an alternative Git tool of your choice and use it to create your own local Git clone of your own fork of the Picard's GitHub Repository.
%PATH%
environment variable,
but if not add both the Python install directory and its scripts subdirectory to %PATH%
To install libdiscid, download libdiscid-0.6.1-win32.zip
from
https://musicbrainz.org/doc/libdiscid
and put discid.dll
in your
Windows\System32
folder (Windows 32-bit) or
Windows\SysWOW64
folder (Windows 64-bit).
You need the following additional Python packages to build and run Picard from source:
The easiest way to install the remaining packages is to open an Administrator command prompt, navigate to the Picard source directory and type:
pip3 install -r requirements.txt pip3 install -r requirements-build.txt
Alternatively to install them individually run:
pip3 install discid pip3 install PyQt5>=5.7.1 pip3 install Mutagen>=1.37 pip3 install Babel pip3 install PyInstaller
If you want to run the Acoustid Scan function when running Picard from source, then you need to install the Chromaprint fpcalc program into your Picard source directory.
chromaprint-fpcalc-1.4.3-windows-x86_64.zip
and put fpcalc.exe
to the picard subdirectory
of your Picard source code directory
Picard uses gettext for internationalisation (i.e. for Picard to appear in your local language). To build the language mappings you need to install gettext.
%PATH%
(default C:\Program Files\gettext-iconv\bin
or C:\Program Files (x86)\gettext-iconv\bin
)
python setup.py build_locales -i
After you have done this, you can run Picard directly from the sources using:
python tagger.py
Picard uses NSIS (Nullsoft Scriptable Install System) for its installer. Download and install "nsis-3.04-setup.exe" from http://nsis.sourceforge.net/Download
Picard will run from source using a python version of the Levenshtein Distance fuzzy string comparison, however to build the C version for inclusion in the executable package you will need to download and install the Microsoft C++ compiler suitable for the version of Picard / Python you are building for:
For Picard version 2 / Python 3, download and install the Buildtools for Visual Studio 2019.
On installation select the Windows 8.1 SDK for compile to work.
Before you can build the Python executable and installer, you need to build the astrcmp C extension and language internationalisation. Start the VisualStudio console using the "Developer Command Prompt for VS 2019", go to the Picard source directory and run these commands:
python setup.py build_ext -i python setup.py build_locales -i
You also need copy discid.dll
(from the libdiscid installation, see above) to the Picard source.
Then you can build the Windows executable:
pyinstaller --noconfirm picard.spec
This will package up Picard and all of its dependencies for distribution
as a Windows application. The result is placed in dist\picard
.
You can now run Picard using the picard.exe
file placed in this
directory.
Finally you can build the installer using these commands:
makensis.exe /INPUTCHARSET UTF8 installer\picard-setup.nsi
The installer will be placed in installer\picard-setup-x.x.exe
.
If these instructions do not work, please research and try to solve the problem yourself - and report the issue and answer in the Metabrainz Ticketing system under "Picard Website" and by submitting a PR against the Picard-Website Github Repository. If you are unable to resolve the issue after research and need further help, please join the MetaBrainz chat to request help from the development community.