Skip to content

Commit

Permalink
Update and harmonize python installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
pmai committed Apr 3, 2024
1 parent 138c6f1 commit 5ef4910
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 14 deletions.
38 changes: 26 additions & 12 deletions doc/setup/installing_linux_python.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,31 @@ include::{root-path}_config.adoc[]
endif::[]
= Installing OSI for Python on Linux

== Installing from PyPI

Steps::

. Open a terminal.
+
. Optionally create and activate a new virtual environment.
+
----
python3 -m venv venv
source venv/bin/activate
----
+
. Install Open Simulation Interface.
+
----
pip install open-simulation-interface
----

== Installing from source

*Prerequisites::

* You have installed everything described in <<top-installing-osi-prerequisits>>.
* You have installed _pip3_.
* You have installed _python-setuptools_.
* For a local installation, you have installed _virtualenv_.
* You have installed _pip_.

Steps::

Expand All @@ -26,27 +45,22 @@ git clone https://github.com/OpenSimulationInterface/open-simulation-interface.g
cd open-simulation-interface
----
+
. Create a new virtual environment.
+
----
virtualenv -p python3 venv
----
+
. Activate the virtual environment.
. Optionally create and activate a new virtual environment.
+
----
python3 -m venv venv
source venv/bin/activate
----
+
. Install Open Simulation Interface.
.. Local installation
+
----
python3 -m pip install .
pip install .
----
+
.. Global installation
+
----
sudo pip3 install .
sudo pip install .
----
32 changes: 30 additions & 2 deletions doc/setup/installing_windows_python.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ include::{root-path}_config.adoc[]
endif::[]
= Installing OSI for Python on Windows

== Installing from PyPI

Steps::

. Open a terminal.
+
. Optionally create and activate a new virtual environment.
+
----
python -m venv venv
venv\Scripts\activate
----
+
. Install Open Simulation Interface.
+
----
pip install open-simulation-interface
----

== Installing from source

Prerequisites::

* You have installed everything described in <<top-installing-osi-prerequisits>>.
Expand All @@ -25,8 +46,15 @@ git clone https://github.com/OpenSimulationInterface/open-simulation-interface.g
cd open-simulation-interface
----
+
. Run the setup script.
. Optionally create and activate a new virtual environment.
+
----
python -m venv venv
venv\Scripts\activate
----
+
. Install Open Simulation Interface.
+
----
python setup.py install
pip install .
----

0 comments on commit 5ef4910

Please sign in to comment.