Install
Prerequisites
All gnss_lib_py
classes and methods are tested in Python 3.8,
and 3.11 in the latest Ubuntu, MacOS and Windows versions.
gnss_lib_py
was originally developed in Python 3.8.9 in
Ubuntu 20/22 and Ubuntu 20 for WSL2.
Standard Installation
gnss_lib_py
is available throughpip
installation with:pip install gnss-lib-py
Editable Installation
Clone the GitHub repository:
git clone https://github.com/Stanford-NavLab/gnss_lib_py.git
Install dependencies with pip:
pip3 install -r requirements.txt
Update pip version.
For Linux and MacOS:
pip install -U pip
For Windows:
python -m pip install -U pip
Install
gnss_lib_py
locally from directory containingpyproject.toml
pip install -e .
Verify installation by running
pytest
. A successful installation will be indicated by all tests passing.pytest
Developer Installation
This project is being developed using pyenv
and poetry
for python version and environment control respectively.
Linux/WSL2 and MacOS
Install
pyenv
using the installation instructions here. The steps are briefly summarized below:Install the Python build dependencies.
Either use the automatic installer or the Basic GitHub Checkout.
In either case, you will need to configure your shell’s environment variables for
pyenv
as indicated in the install instructions. For example, forbash
, you can add the following lines to the end of your.bashrc
export PATH="$HOME/.pyenv/bin:$PATH" eval "$(pyenv init --path)" eval "$(pyenv virtualenv-init -)"
Install Python 3.8.9 or above with
pyenv
. For example,pyenv install 3.8.9
.Clone the
gnss_lib_py
repository.Inside the
gnss_lib_py
runpyenv local 3.8.9
(switching out with the version of Python you installed in the previous step if different than 3.8.9) to set the Python version that code in the repository will run.Install
poetry>=1.2
using the instructions here.Install Python dependencies using
poetry install
.
Install pandoc to be able to build documentation. See details here.
For Linux
sudo apt install pandoc
For Windows
choco install pandoc
For MacOS
brew install pandoc
Verify that the code is working by running tests on the code using
poetry run pytest
Check the Testing section in the Contribution guide for more details
Verify that the documentation is building locally using
./build_docs.sh
Windows
Currently, full support is not offered for Windows, but
pyenv
can be installed following instructions here.The workflow for installing
poetry
andgnss_lib_py
is similar oncepyenv
has been set up.
Refer to the Documentation section once you add code/documentation and want to build and view the documentation locally.