Skip to content

Commit e276a8f

Browse files
committed
Add installation issues section in the "troubleshooting" part of the documentation
1 parent 189cf54 commit e276a8f

5 files changed

Lines changed: 135 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ CHANGELOG
33

44
For more details refer to the [documentation](https://softwarequtech.github.io/SimulaQron/index.html).
55

6-
2026-05-13 (v4.1.2)
6+
2026-05-15 (v4.1.2)
77
-------------------
88
- Fix expected message exchange in event-based Ping-Pong examples.
99
- Only start required Virtual Nodes processes when starting SimulaQron backend instead of starting all the
@@ -18,7 +18,6 @@ For more details refer to the [documentation](https://softwarequtech.github.io/S
1818
processes. Run `simulaqron reset -h` for more info.
1919
- Log files can now be found inside the `/tmp/simulaqron` folder.
2020

21-
2221
2026-04-23 (v4.1.1)
2322
-------------------
2423
- Update README file.

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SimulaQron - simple quantum network simulator (4.1.1)
1+
# SimulaQron - simple quantum network simulator (4.1.2)
22

33
The purpose of this simulator of quantum network nodes is to allow you to develop new applications for
44
a future quantum internet, while we do not yet have real quantum network nodes available for testing.
@@ -34,7 +34,12 @@ After this point, you should have all the required dependencies.
3434

3535
#### Create Python virtual environment (venv)
3636

37-
Before proceeding with the installation
37+
Before proceeding with the installation, create a python virtual environment (venv) and activate it:
38+
39+
```shell
40+
python3.12 -m venv simulaqron
41+
source simulaqron/bin/activate
42+
```
3843

3944

4045
##### Installing from PyPI
@@ -100,7 +105,7 @@ Before proceeding with the SimulaQron install, you need to install python 3.12,
100105
brew install python@3.12
101106
```
102107

103-
Additionally, to install the optional dependencies, you will need to install *XCode COmmand Line Tools*. To do
108+
Additionally, to install the optional dependencies, you will need to install *XCode Command Line Tools*. To do
104109
so, run the following command in a terminal:
105110

106111
```shell

docs/Troubleshooting.rst

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,3 +290,125 @@ On macOS, you can use the command ``netstat -anvp tcp | awk 'NR<3 || /LISTEN/'``
290290
On both systems, the column "Local Address" will give you information about the IP and port numbers already taken. That
291291
column has the format ``<IP>:<port>``, where ``IP`` follows the format ``AAA.BBB.CCC.DDD``, which is the followed by
292292
the port number. If your chosen port number is not on the list, it's free to use!
293+
294+
295+
Installation Issues
296+
-------------------
297+
298+
This section is intended to provide a way to solve the most common problems when installing SimulaQron. Please note
299+
that **this list is not exhaustive**, and it is provided in a best-effort basis.
300+
301+
302+
Windows
303+
^^^^^^^
304+
305+
Installation in Windows environments *is only supported using a VM or WSL*. To install WSL on your Windows environment,
306+
please refer to the `official microsoft documentation <https://learn.microsoft.com/en-us/windows/wsl/install>`_.
307+
308+
After you installed WSL, you can follow the Linux installation instructions.
309+
310+
311+
Linux-specific errors
312+
^^^^^^^^^^^^^^^^^^^^^
313+
314+
The instructions assume that you are running a Debian-based linux distribution (like Ubuntu).
315+
316+
317+
Cannot find the ``python3.12`` package
318+
""""""""""""""""""""""""""""""""""""""
319+
320+
Python 3.12 is a rather old python version. For this reason, this python version *is not available* in most of the
321+
recent distribution versions. To have access to this version, you need to add the "Deadsnakes" repository by running::
322+
323+
$ sudo add-apt-repository -y "ppa:deadsnakes/ppa"
324+
$ sudo apt-get update
325+
326+
After running that, try installing Python 3.12 again.
327+
328+
329+
``python3.12 -m ensurepip --upgrade --default-pip`` returned non-zero exit status 1
330+
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
331+
332+
This usually happens when creating a python virtual environment. The main reason for this error is that you are
333+
missing the ``python3.12-venv`` package. For SimulaQron to run, we need the full installation of Python 3.12,
334+
including the development package::
335+
336+
$ sudo apt-get install python3.12-full python3.12-dev
337+
338+
After installing this, try creating your virtual environment again.
339+
340+
341+
error: command 'x86_64-linux-gnu-g++' failed: No such file or directory
342+
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
343+
344+
This usually happens when installing simulaqron using pip *with the optional dependencies* (i.e.
345+
``pip install "simulaqron[opt]"``), on a machine that does not have a C++ compiler. Please make sure that you install
346+
all the requirements by running::
347+
348+
$ sudo apt-get install build-essential cmake vim git linux-headers-generic
349+
350+
Then try to install simulaqron with the optional dependencies again.
351+
352+
353+
macOS-specific errors
354+
^^^^^^^^^^^^^^^^^^^^^
355+
356+
357+
error: command 'x86_64-linux-gnu-g++' failed: No such file or directory
358+
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
359+
360+
This usually happens when installing simulaqron using pip *with the optional dependencies* (i.e.
361+
``pip install "simulaqron[opt]"``), on a machine that does not have a C++ compiler. Please make sure that you install
362+
all the requirements by running::
363+
364+
% xcode-select --install
365+
366+
And follow the options for installing XCode build tools.
367+
368+
369+
General installation errors
370+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
371+
372+
373+
fatal error: Python.h: No such file or directory
374+
""""""""""""""""""""""""""""""""""""""""""""""""
375+
376+
This happens when you are missing the ``python3.12-dev`` package. On Linux, run::
377+
378+
$ sudo apt-get install python3.12-dev
379+
380+
On macOS, brew should install the development dependencies. You can always try to install python again::
381+
382+
% brew reinstall python@3.12
383+
384+
After this, try installing simulaqron again.
385+
386+
387+
'Compiler' object has no attribute 'dry_run'
388+
""""""""""""""""""""""""""""""""""""""""""""
389+
390+
This error arises when trying to install simulaqron with the optional dependencies. One of them is
391+
`ProjectQ <https://projectq.ch/>`_, which is a rather old software, written in C++. Considering this, ProjectQ
392+
*needs to be compiled by pip* before installing it. Since ProjectQ is an old software, it relies on compilation
393+
tools that nowadays are not part of the pip compilation toolchain.
394+
395+
*On Linux systems* we can fix this by installing the older versions of the pip toolchain, and instruct pip to
396+
not create an isolated environment for compiling ProjectQ::
397+
398+
$ pip install "setuptools<81" pybind11
399+
$ pip install "git+https://github.com/ProjectQ-Framework/ProjectQ.git@v0.8.0" --no-build-isolation
400+
401+
*On macOS systems*, we have also observed this error when compiling `QuTip <http://qutip.org/>`_. In this case, you
402+
can also instruct pip to compile Qutip with the older toolchain::
403+
404+
% pip install "setuptools<81" pybind11 Cython
405+
% pip install "git+https://github.com/ProjectQ-Framework/ProjectQ.git@v0.8.0" --no-build-isolation
406+
% pip install "qutip<5.0.0" --no-build-isolation
407+
408+
.. warning:: Please note that compiling the packages might take more than a few minutes. As an alternative, we provide
409+
**unofficial packages already compiled** for the platforms supported by SimulaQron. To use these **unofficial
410+
distributions**, add an option to ``pip`` to look for ``qutip`` and ``projectq`` packages on an 3rd party repository::
411+
412+
$ pip install projectq qutip --index-url https://gitlab.tudelft.nl/api/v4/projects/28442/packages/pypi/simple
413+
414+
Then you can try to install simulaqron with optional dependencies again.

simulaqron/virtual_node/project_q_simulator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
try:
3232
import projectq as pQ
3333
except ImportError:
34-
raise RuntimeError("If you want to use the projectq backend you need to install the python package 'projectq'")
34+
raise RuntimeError("If you want to use the projectq backend you need to install simulaqron "
35+
"with the optional dependencies: 'pip install simulaqron[opt]'")
3536
import numpy as np
3637

3738
from simulaqron.virtual_node.basics import QuantumEngine, QuantumError, NoQubitError

simulaqron/virtual_node/qutip_simulator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
qp.gate_expand_2toN = lambda U, N, t1, t2: _expand_op(U, N, [t1, t2])
5050

5151
except ImportError:
52-
raise RuntimeError("If you want to use the qutip backend you need to install the python package 'qutip'")
52+
raise RuntimeError("If you want to use the qutip backend you need to install simulaqron "
53+
"with the optional dependencies: 'pip install simulaqron[opt]'")
5354

5455
from simulaqron.virtual_node.basics import QuantumEngine, QuantumError, NoQubitError
5556

0 commit comments

Comments
 (0)