-
Notifications
You must be signed in to change notification settings - Fork 129
Update and harmonize python installation instructions #800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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:: | ||
|
||
|
@@ -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 . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you really sudo? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't ;), but then I never install globally anyway. More seriously: That was part of the existing instructions, and yes, if you want the package installed globally then you likely need root permissions on most systems. On Ubuntu e.g. if you do not have root permissions, it will just install for the user. Not that I would recommend anything like that, hence the local installation is the first suggested one. |
||
---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought you only use it with the prefix: python3 -m pip*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only in specific circumstances (e.g. upgrading pip in place, or where there was a multitude of python installations 2 vs 3 - also somewhat ubuntu specific); on most systems pip install is the suggested way to do stuff, and generally is e.g. the way PyPI recommends it.
Both ways work, but as there already was a mixture between the two, I picked one to stay consistent.