@@ -290,3 +290,125 @@ On macOS, you can use the command ``netstat -anvp tcp | awk 'NR<3 || /LISTEN/'``
290290On both systems, the column "Local Address" will give you information about the IP and port numbers already taken. That
291291column has the format ``<IP>:<port> ``, where ``IP `` follows the format ``AAA.BBB.CCC.DDD ``, which is the followed by
292292the 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.
0 commit comments