| 1 |
Installation Instructions (Windows) |
| 2 |
=================================== |
| 3 |
|
| 4 |
Install with Installer |
| 5 |
---------------------- |
| 6 |
|
| 7 |
We now have a proper [installer](https://www.github.com/eoyilmaz/displaycal-py3/releases) for Windows |
| 8 |
and this is the preferred way of running DisplayCAL under Windows (unless you want to |
| 9 |
test the latest code). |
| 10 |
|
| 11 |
> [!NOTE] |
| 12 |
> ArgyllCMS 3.5.0 adds native Windows ARM64 binaries (`Argyll_V3.5.0_win_arm64_exe.zip`) |
| 13 |
> in addition to x86/x64 builds. DisplayCAL download handling supports this now. |
| 14 |
> On ARM64 systems, instrument USB driver setup can still need extra manual steps. |
| 15 |
|
| 16 |
Install through PyPI |
| 17 |
-------------------- |
| 18 |
|
| 19 |
If you desire so, you can install DisplayCAL through PyPI. Use Python 3.9 to 3.14 |
| 20 |
and create a dedicated virtual environment to avoid package conflicts with other Python |
| 21 |
programs. We recommend using Python 3.11 or newer. Here is the installation procedure: |
| 22 |
|
| 23 |
1- Download and install a supported Python release from |
| 24 |
[Python.org](https://www.python.org/downloads/windows/). |
| 25 |
|
| 26 |
Also don't forget to select "Add Python 3.xx to PATH" in the installer. |
| 27 |
|
| 28 |
 |
| 29 |
|
| 30 |
2- Download and install Visual Studio Build Tools: |
| 31 |
|
| 32 |
Download from https://visualstudio.microsoft.com/visual-cpp-build-tools/ |
| 33 |
|
| 34 |
Select "Desktop development with C++" only: |
| 35 |
|
| 36 |
 |
| 37 |
|
| 38 |
3- Create and activate a virtual environment: |
| 39 |
|
| 40 |
After both Python and Visual Studio Build Tools are installed run the following in |
| 41 |
the command prompt: |
| 42 |
|
| 43 |
```shell |
| 44 |
py -3.11 -m venv %USERPROFILE%\venv-displaycal |
| 45 |
%USERPROFILE%\venv-displaycal\Scripts\activate |
| 46 |
pip install --upgrade pip |
| 47 |
pip install displaycal |
| 48 |
``` |
| 49 |
|
| 50 |
If you installed a different Python version, replace `-3.11` accordingly. |
| 51 |
|
| 52 |
4- Run DisplayCAL: |
| 53 |
|
| 54 |
```shell |
| 55 |
python -m DisplayCAL |
| 56 |
``` |
| 57 |
|
| 58 |
If you close the current terminal and open a new one, activate the same virtual |
| 59 |
environment again before calling `python -m DisplayCAL`: |
| 60 |
|
| 61 |
```shell |
| 62 |
%USERPROFILE%\venv-displaycal\Scripts\activate |
| 63 |
``` |
| 64 |
|
| 65 |
> [!WARNING] |
| 66 |
> Under Windows don't run DisplayCAL inside the IDE (Vscode, Pycharm etc.) terminal as |
| 67 |
> most of the IDE's are creating virtual terminals and it is not possible to capture the |
| 68 |
> command outputs with Wexpect. |
| 69 |
|
| 70 |
Build From Source |
| 71 |
----------------- |
| 72 |
|
| 73 |
Under Windows the `makefile` workflow will not work. Build from source in a virtual |
| 74 |
environment to keep dependencies isolated from your system Python installation. |
| 75 |
Currently, DisplayCAL supports Python 3.9 to 3.14. To build DisplayCAL from source under |
| 76 |
Windows follow these steps: |
| 77 |
|
| 78 |
1- Download and install a supported Python release from |
| 79 |
[Python.org](https://www.python.org/downloads/windows/). |
| 80 |
|
| 81 |
Also don't forget to select "Add Python 3.xx to PATH" in the installer. |
| 82 |
|
| 83 |
 |
| 84 |
|
| 85 |
2- Download and install Visual Studio Build Tools: |
| 86 |
|
| 87 |
Download from https://visualstudio.microsoft.com/visual-cpp-build-tools/ |
| 88 |
|
| 89 |
Select "Desktop development with C++" only: |
| 90 |
|
| 91 |
 |
| 92 |
|
| 93 |
3- Download and install Git: |
| 94 |
|
| 95 |
https://www.git-scm.com/download/win |
| 96 |
|
| 97 |
When installer asks, the default settings are okay. |
| 98 |
|
| 99 |
4- Clone DisplayCAL repository and create a virtual environment: |
| 100 |
|
| 101 |
Open up a command prompt and run the following: |
| 102 |
|
| 103 |
```shell |
| 104 |
cd %HOME% |
| 105 |
git clone https://github.com/eoyilmaz/displaycal-py3.git |
| 106 |
cd displaycal-py3 |
| 107 |
``` |
| 108 |
|
| 109 |
Then we suggest switching to the `develop` branch as we would have fixes introduced |
| 110 |
to that branch the earliest. To do that run: |
| 111 |
|
| 112 |
```shell |
| 113 |
git checkout develop |
| 114 |
``` |
| 115 |
|
| 116 |
> [!TIP] |
| 117 |
> If you want to switch to some other branches to test the code you can replace |
| 118 |
> `develop` in the previous command with the branch name: |
| 119 |
> ```shell |
| 120 |
> git checkout 367-compiled-sucessfully-in-w10-py311-but-createprocess-fails-call-to-dispread-to-measure |
| 121 |
> ``` |
| 122 |
|
| 123 |
Create and activate a virtual environment in the project folder: |
| 124 |
|
| 125 |
```shell |
| 126 |
py -3.11 -m venv .venv |
| 127 |
.venv\Scripts\activate |
| 128 |
pip install --upgrade pip |
| 129 |
``` |
| 130 |
|
| 131 |
If you installed a different Python version, replace `-3.11` accordingly. |
| 132 |
|
| 133 |
Let's install the requirements, build displaycal and install it: |
| 134 |
|
| 135 |
```shell |
| 136 |
pip install -r requirements.txt -r requirements-dev.txt |
| 137 |
python -m build |
| 138 |
for /r dist %f in (DisplayCAL-*.whl) do pip install "%f" |
| 139 |
``` |
| 140 |
|
| 141 |
5- Run DisplayCAL: |
| 142 |
|
| 143 |
```shell |
| 144 |
python -m DisplayCAL |
| 145 |
``` |
| 146 |
|
| 147 |
6- To rebuild and install it again: |
| 148 |
|
| 149 |
First remove the old installation: |
| 150 |
|
| 151 |
```shell |
| 152 |
pip uninstall displaycal |
| 153 |
``` |
| 154 |
|
| 155 |
Build and install it again: |
| 156 |
|
| 157 |
```shell |
| 158 |
python -m build |
| 159 |
for /r dist %f in (DisplayCAL-*.whl) do pip install "%f" |
| 160 |
``` |
| 161 |
|
| 162 |
Build The Installer |
| 163 |
------------------- |
| 164 |
|
| 165 |
To build the installer for your own use you can follow these steps: |
| 166 |
|
| 167 |
1- Follow the instructions explained in |
| 168 |
[Build From Source](#build-from-source) to build DisplayCAL from |
| 169 |
its source. |
| 170 |
|
| 171 |
2- Use the `DisplayCAL\freeze.py` script to generate the frozen executables. Under the |
| 172 |
`displaycal-py3` folder run the following: |
| 173 |
|
| 174 |
```shell |
| 175 |
python DisplayCAL\freeze.py |
| 176 |
``` |
| 177 |
|
| 178 |
This should generate a folder under the `dist` folder with a name similar to |
| 179 |
`py2exe.win32-py3.xx-DisplayCAL-<version>`. |
| 180 |
|
| 181 |
All the executables and resources to run DisplayCAL are placed under this folder. So, |
| 182 |
you can directly run the executables under this folder. |
| 183 |
|
| 184 |
3- Download and install [Inno Setup](https://jrsoftware.org/isdl.php#stable): |
| 185 |
|
| 186 |
4- Generate the Inno Setup script: |
| 187 |
|
| 188 |
```shell |
| 189 |
python setup.py inno |
| 190 |
``` |
| 191 |
|
| 192 |
This will generate a file called `DisplayCAL-Setup-py2exe.win-amd64-py3.11.iss` |
| 193 |
|
| 194 |
5- Run Inno Setup to build the script: |
| 195 |
|
| 196 |
```shell |
| 197 |
cd dist |
| 198 |
iscc DisplayCAL-Setup-py2exe.win-amd64-py3.11.iss |
| 199 |
``` |
| 200 |
|
| 201 |
6- This should now generate an installer with a name similar to |
| 202 |
`DisplayCAL-<version>-Setup.exe` that you can use to install DisplayCAL |
| 203 |
to any Windows computer. |