From 81273f2f7b3b331099f64de1ead2ed116ae30657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dion=C3=ADsio?= <57299939+Joao-Dionisio@users.noreply.github.com> Date: Fri, 30 May 2025 08:24:49 +0100 Subject: [PATCH 1/3] Add venv instructions --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6bc0a5998..221395bc3 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,20 @@ See [CHANGELOG.md](https://github.com/scipopt/PySCIPOpt/blob/master/CHANGELOG.md Installation ------------ -The recommended installation method is via PyPI +The recommended installation method is via [PyPI](https://pypi.org/project/PySCIPOpt/): + +```bash +pip install pyscipopt +``` + +To avoid interfering with system packages, it's best to use a [virtual environment](https://docs.python.org/3/library/venv.html): + ```bash +python3 -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate pip install pyscipopt pip install pyscipopt ``` +Remember to activate the environment (`source venv/bin/activate`) in each terminal session where you use PySCIPOpt. +Note that some configurations require the use of virtual environments. For information on specific versions, installation via Conda, and guides for building from source, please see the [online documentation](https://pyscipopt.readthedocs.io/en/latest/install.html). From 6315f4e7d6aeda86af74b62c9903abd4ee382f67 Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Fri, 30 May 2025 09:36:02 +0200 Subject: [PATCH 2/3] update installation instruction in other places --- INSTALL.md | 9 +++++++++ docs/install.rst | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 86316fb99..9b2b44406 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -56,6 +56,15 @@ Installation from PyPI python -m pip install pyscipopt +To avoid interfering with system packages, it's best to use a [virtual environment](https://docs.python.org/3/library/venv.html).
+**Warning!** This is mandatory in some newer configurations. + +```bash +python3 -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate pip install pyscipopt +pip install pyscipopt +``` +Remember to activate the environment (`source venv/bin/activate`) in each terminal session where you use PySCIPOpt. + Please note that if your Python version and OS version are in the combinations at the start of this INSTALL file then pip now automatically installs a pre-built version of SCIP. For these combinations, to use your own installation of SCIP, please see the section on building from source. For unavailable combinations this pip command will automatically diff --git a/docs/install.rst b/docs/install.rst index fce6368b1..ece2a3a94 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -21,6 +21,20 @@ To install PySCIPOpt simply run the command: pip install pyscipopt +To avoid interfering with system packages, it's best to use a `virtual environment `. + +.. warning:: + + Using a virtual environment is **mandatory** in some newer Python configurations + to avoid permission and package conflicts. + +.. code-block:: bash +python3 -m venv venv +source venv/bin/activate # On Windows use: venv\Scripts\activate +pip install pyscipopt + +Remember to activate the environment (``source venv/bin/activate``) in each terminal session where you use PySCIPOpt. + .. note:: For Linux users: PySCIPOpt versions newer than 5.1.1 installed via PyPI now require glibc 2.28+ For our build infrastructure we use `manylinux `_. From a3c2fd7e10441aa37c8a69bffabc517fa2cac0a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dion=C3=ADsio?= <57299939+Joao-Dionisio@users.noreply.github.com> Date: Thu, 5 Jun 2025 10:48:24 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 221395bc3..ed20f05c7 100644 --- a/README.md +++ b/README.md @@ -32,10 +32,11 @@ pip install pyscipopt To avoid interfering with system packages, it's best to use a [virtual environment](https://docs.python.org/3/library/venv.html): ```bash -python3 -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate pip install pyscipopt +python3 -m venv venv # creates a virtual environment called venv +source venv/bin/activate # activates the environment. On Windows use: venv\Scripts\activate pip install pyscipopt ``` -Remember to activate the environment (`source venv/bin/activate`) in each terminal session where you use PySCIPOpt. +Remember to activate the environment (`source venv/bin/activate` or equivalent) in each terminal session where you use PySCIPOpt. Note that some configurations require the use of virtual environments. For information on specific versions, installation via Conda, and guides for building from source,