|
|
# Installing SEMpy's modules
|
|
|
|
|
|
Please enter the following command lines:
|
|
|
|
|
|
* In the Anaconda command prompt if you are a Windows Users
|
|
|
|
|
|
* In you system bash if you are a Linux/Mac user
|
|
|
|
|
|
## 1 Create a folder containing SEMpy's recipe
|
|
|
|
|
|
We recommend you to have a fixed working directory:
|
|
|
```bash
|
|
|
mkdir sempy
|
|
|
cd sempy
|
|
|
```
|
|
|
Then get SEMpy's recipe
|
|
|
```bash
|
|
|
git clone https://gitlab.isae-supaero.fr/sempy/sempy-recipe.git
|
|
|
cd sempy-recipe
|
|
|
```
|
|
|
|
|
|
## 2. Build and install SEMpy package
|
|
|
|
|
|
Now that you entered the sempy-recipe folder, run:
|
|
|
```bash
|
|
|
conda build . -c conda-forge
|
|
|
```
|
|
|
|
|
|
Now that the package is built, you can install it locally on your machine.
|
|
|
|
|
|
Note: We recommand to create a new environment to install SEMpy, to avoid conflicts with already installed packages
|
|
|
|
|
|
Run :
|
|
|
```bash
|
|
|
conda install --use-local sempy
|
|
|
```
|
|
|
|
|
|
WARNING :
|
|
|
If you are willing to use the Visualisation module or the Optimal Control module of SEmpy, you will need to download manually several dependencies. This will be needed for the next step, that is to say testing the package.
|
|
|
You can check the associated README.md or Wiki page for each of this modules to add these additional dependencies.
|
|
|
|
|
|
Note: sempy is a metapackage including sempy_core, sempy_optimal_control and sempy_visualisation as dependencies. It is the short way to install all of them.
|
|
|
|
|
|
## 3 Testing SEMpy
|
|
|
|
|
|
### Linux - Debian
|
|
|
|
|
|
From now, get back to your home directory, and then go to Anaconda3's packages location
|
|
|
```bash
|
|
|
cd
|
|
|
cd anaconda3/pkgs/
|
|
|
```
|
|
|
|
|
|
You will have to do the operation for sempy_core, sempy_optimal_control, and sempy_visualisation.
|
|
|
|
|
|
Look for the complete name of your packages (sempy_core, sempy_optimal_control, and sempy_visualisation) with:
|
|
|
|
|
|
```bash
|
|
|
ls
|
|
|
```
|
|
|
|
|
|
```bash
|
|
|
cd <complete-package-name>/lib/python3.8/site-packages/sempy/<the-version-you-installed>/
|
|
|
```
|
|
|
|
|
|
Note: < the-version-you-installed > is either core, optimal_control, or visualisation
|
|
|
|
|
|
And then run the unittests
|
|
|
```bash
|
|
|
python -m unittest
|
|
|
```
|
|
|
|
|
|
##### Windows
|
|
|
|
|
|
From now, get back to your home directory, and then go the SEMpy's location
|
|
|
```bash
|
|
|
cd \
|
|
|
cd Users\<your-username>\Anaconda3\pkgs\
|
|
|
```
|
|
|
|
|
|
You will have to do the operation for sempy_core, sempy_optimal_control, and sempy_visualisation.
|
|
|
|
|
|
Look for the complete name of your packages (sempy_core, sempy_optimal_control, and sempy_visualisation) with:
|
|
|
|
|
|
|
|
|
```bash
|
|
|
dir
|
|
|
```
|
|
|
|
|
|
Then run :
|
|
|
|
|
|
```bash
|
|
|
cd <complete-package-name>\lib\python3.8\site-packages\sempy\<the-version-you-installed>\
|
|
|
```
|
|
|
|
|
|
Note: < the-version-you-installed > is either core, optimal_control, or visualisation
|
|
|
|
|
|
And then run the unittests
|
|
|
```bash
|
|
|
python -m unittest
|
|
|
```
|
|
|
|
|
|
|
|
|
### macOS
|
|
|
|
|
|
From now, get back to your home directory, and then go the SEMpy's location
|
|
|
```bash
|
|
|
cd
|
|
|
cd opt/anaconda3/pkgs/
|
|
|
```
|
|
|
You will have to do the operation for sempy_core, sempy_optimal_control, and sempy_visualisation.
|
|
|
|
|
|
Look for the complete name of your packages (sempy_core, sempy_optimal_control, and sempy_visualisation) with:
|
|
|
|
|
|
|
|
|
```bash
|
|
|
ls
|
|
|
```
|
|
|
|
|
|
If you installed sempy_core, sempy_optimal_control, or sempy_visualisation, run:
|
|
|
|
|
|
```bash
|
|
|
cd <complete-package-name>/lib/python3.8/site-packages/sempy/<the-version-you-installed>/
|
|
|
```
|
|
|
|
|
|
Note: < the-version-you-installed > is either core, optimal_control, or visualisation
|
|
|
|
|
|
And then run the unittests
|
|
|
```bash
|
|
|
python -m unittest
|
|
|
```
|
|
|
|
|
|
|
|
|
If all tests succeeded, SEMpy lib is now ready to use! |
|
|
\ No newline at end of file |