Manual Installation#
Warning
This is not recommended for non-expert users because:
You must manually download a
.whlrelease.
Or worse:
You need to install Hatch;
Build the project;
Errors or warnings may occur during the build.
In addition, if you choose an environment, you need to set it up, install the requirements, run the tests to make sure there are no errors.
If you have problems using PyPI to install the library, please create a new issue. Thanks for your cooperation.
Since you are here, you may need to manually install the project. In this section we suggest 3 different ways to do this. We will start with the easiest one and come to the last one, which is how to create a virtual env and use the library natively.
The three methods are:
Get the
.whlfile of a specific release and install it usingpip;Clone the project, build it using a build backend and install it;
Create and prepare a virtual environment, and run tests to verify that everything works.
Download .whl from the release page#
From the release page on GitHub,
choose which release you want to install.
Once you have chosen, click on it and download the .whl file.
The wheel file can be installed using the following:
whl file.#$ pip install simulator_automatic_warehouse-1.0.0-py3-none-any.whl
Build the project#
To build the project we need to install a build backend. The Simulator Automatic Warehouse uses Hatch to do this. So the first thing you need to do is install it on your system:
$ pip install hatch
Now clone the Simulator Automatic Warehouse repository using git (or any other method you like):
$ git clone https://github.com/AndreVale69/simulator-automatic-warehouse.git
Go to the repository folder you just cloned and build the project using hatch:
$ cd simulator-automatic-warehouse
$ hatch build
When the build is complete, you should see a new folder called dist.
Inside are two files, and we are interested in the one with the .whl extension.
It can be installed using pip:
$ cd dist
$ pip install simulator_automatic_warehouse-1.0.0-py3-none-any.whl
Once the package is installed, you can remove the repository from your local computer and uninstall Hatch.
Create and use a venv#
The following steps can also be applied to the previous section (Build the project). It’s always recommended to use a virtual environment.
First, we create a virtual environment using the command:
$ python3 -m venv ~/.virtualenvs/choose-a-name-for-your-venv
Note
On Windows, invoke the venv command as follows:
c:\>Python35\python -m venv c:\path\to\myenv
Alternatively, if you configured the PATH and PATHEXT variables for your Python installation:
c:\>python -m venv c:\path\to\myenv
Then, we activate the virtual environment:
$ source ~/.virtualenvs/choose-a-name-for-your-venv/bin/activate
Note
On Windows, see the following chapter in the Python documentation.
Once the venv is enabled, you can easily install the package using pip and PyPI (PyPI section).
If you want to contribute to the project and set up the environment, read on.
Download the repository using git clone:
$ git clone https://github.com/AndreVale69/simulator-automatic-warehouse.git
Go to the repository and install the dependencies of the project. The Simulator Automatic Warehouse uses 4 main packages:
pandas,simpy,PyYAML,jsonschema. See the Dependencies section for more information.The packages and their required versions can be found in the
requirements.txtfile. Use the following command to install them:$ pip install -r requirements.txt
Once the dependencies are installed, you are in! You are ready to run the simulator and the digital twin. At this stage, it’s a good idea to run the tests and check that everything works.
The tests have the
pytestpackage dependencies. The versions and packages to install can be found intests/test-requirements.txt. Then we can simply install them with the command:$ pip install -r tests/test-requirements.txt
Finally, once the pytest dependencies have been successfully installed, run the tests with the command:
Make sure you are in the project home, not the tests folder.#$ PYTHONPATH=. pytest --config-file='tests/pytest.ini'
Note
The project also provides a
tests/tox.iniconfiguration. You can run it from the project root with:$ tox -c tests/tox.ini
Or, to run environments in parallel:
$ tox run-parallel -c tests/tox.ini
These commands assume Python 3.9 through 3.14 are already installed on your system.
Note
On Windows, the
PYTHONPATHin one line doesn’t work. If you then open a PowerShell and go to the home of the project, you can export thePYTHONPATHenvironment variable using the Get-Location command:$env:PYTHONPATH=Get-Location pytest --config-file='tests/pytest.ini'