You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 10_Getting_Started/20_Build/10_Linux.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,18 +94,16 @@ SOFA requires some libraries:
94
94
sudo apt install libboost-all-dev
95
95
```
96
96
97
-
- **Python 3.10** + pip + numpy + scipy
97
+
- **Python 3.12** + pip + numpy + scipy
98
98
```
99
-
sudo apt install python3.10-dev pybind11-dev
99
+
sudo apt install python3.12-dev python3.12-venv
100
100
```
101
-
101
+
Python 3.12 now favor the use of venv. We highly recommend it too. To bootstrap it type `python3.12 -m venv sofa-venv` in the folder you want to keep this venv. We recommend creating it either in your home directory, in the folder containing both your sources and the build directory. Once created, you can activate it by calling `source /path/to/sofa-venv/bin/activate`. Now you can install all dependency through the following commands:
Now, each time you want to build or use SOFA, you first need to call `source /path/to/sofa-venv/bin/activate` to activate this virtual environment and get access to the dependencies.
0. Activate your venv `source /path/to/sofa-venv/bin/activate` and tell CMake to look there to find pybind11 `export CMAKE_PREFIX_PATH=/path/to/sofa-venv/lib/python3.12/site-packages`
209
+
210
210
1. Create build directories respecting the arrangement above.
211
211
212
212
2. Run CMake-GUI and set source folder and build folder.
@@ -256,7 +256,8 @@ Time for a coffee!
256
256
To solve Qt detection errors, click on **Add Entry** and add
257
257
`CMAKE_PREFIX_PATH` with path `/home/YOUR_USERNAME/Qt/QT_VERSION/COMPILER` matching your
Copy file name to clipboardExpand all lines: 10_Getting_Started/20_Build/20_MacOS.md
+16-7Lines changed: 16 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,14 +84,19 @@ SOFA requires some libraries:
84
84
brew install boost
85
85
```
86
86
87
-
- **Python 3.10** + pip + numpy + scipy
88
-
```bash
89
-
brew install python@3.10
87
+
- **Python 3.12** + pip + numpy + scipy
88
+
```
89
+
brew install python@3.12
90
90
brew link --force python@3.10
91
-
python3 -m pip install --upgrade pip
92
-
python3 -m pip install numpy scipy
93
-
brew install pybind11
94
91
```
92
+
Python 3.12 now favor the use of venv. We highly recommend it too. To bootstrap it type`python3.12 -m venv sofa-venv`in the folder you want to keep this venv. We recommend creating it either in your home directory, in the folder containing both your sources and the build directory. Once created, you can activate it by calling `source /path/to/sofa-venv/bin/activate`. Now you can install all dependency through the following commands:
Now, each time you want to build or use SOFA, you first need to call `source /path/to/sofa-venv/bin/activate` to activate this virtual environment and get access to the dependencies.
0. Activate your venv `source /path/to/sofa-venv/bin/activate` and tell CMake to look there to find pybind11 `export CMAKE_PREFIX_PATH=/path/to/sofa-venv/lib/python3.12/site-packages`
182
+
176
183
1. Create build directories respecting the arrangement above.
177
184
178
185
2. Run CMake.app and set source folder and build folder.
@@ -214,7 +221,9 @@ To solve Qt detection errors, click on **Add Entry** and add
214
221
`CMAKE_PREFIX_PATH` with path `/home/YOUR_USERNAME/Qt/QT_VERSION/COMPILER` matching your
Copy file name to clipboardExpand all lines: 10_Getting_Started/20_Build/30_Windows.md
+20-13Lines changed: 20 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,13 +56,15 @@ SOFA requires some libraries:
56
56
-**For Visual Studio 2019**: choose boost_X_X_X-msvc-14.2-64.exe
57
57
-**For Visual Studio 2017**: choose boost_X_X_X-msvc-14.1-64.exe
58
58
59
-
-**Python** (= 3.10.x)
60
-
Download and install the latest [**Python 3.10 (amd64)**](https://www.python.org/ftp/python/3.10.10/python-3.10.10-amd64.exe).
61
-
Then install the python dependencies. Run the following commands in cmd by replacing `path\to\Python310\ ` by the path where python was installed on your OS.
59
+
-**Python** (= 3.12.x)
60
+
Download and install the latest [**Python 3.12 (amd64)**](https://www.python.org/ftp/python/3.12.10/python-3.12.10-amd64.exe).
61
+
Python 3.12 now favor the use of venv. We highly recommend it too. To bootstrap it type `C:\path\to\python3.12 -m venv sofa-venv` in the folder you want to keep this venv. We recommend creating it either in your home directory, in the folder containing both your sources and the build directory. Once created, you can activate it by calling `C:\path\to\sofa-venv\bin\Scripts\activate.bat`. Now you can install all dependency through the following commands.
62
+
Then, install the Python dependencies. Run the following commands in cmd by replacing `path\to\Python312\` by the path to you venv bin directory.
Now, each time you want to build or use SOFA, you first need to call `C:\path\to\sofa-venv\bin\Scripts\activate.bat` to activate this virtual environment and get access to the dependencies.
2. In Windows Start menu, search for `Native Tools Command Prompt` and run the one corresponding to your Windows architecture (x64 for 64-bit, x86 for 32-bit).
3. In the command prompt, type `cmake-gui` and press Enter.
135
+
3. Call ``C:\path\to\sofa-venv\bin\Scripts\activate.bat`` to activate the virtual environment.
136
+
137
+
4. In the command prompt, type `cmake-gui` and press Enter.
134
138
If you get the error `'cmake-gui' is not recognized as an internal or external command`, it means that your system PATH does not correctly include the path to cmake-gui. In this case, you need to provide the full path to your cmake-gui.
135
139
136
-
4. In CMake-GUI, set source folder and build folder.
140
+
5. In CMake-GUI, set source folder and build folder.
137
141
138
-
5. Run **Configure**.
142
+
6. Run **Configure**.
139
143
140
-
6. A popup will ask you to specify the generator for the project.
144
+
7. A pop-up will ask you to specify the generator for the project.
141
145
142
146
- If you want use **Visual Studio IDE**, select "Visual Studio 15 2017 Win64" or "Visual Studio 16 2019 Win64" (or without the "Win64" if you are on Windows 32-bit).
143
147
- If you want to use **another IDE like QtCreator**, select "CodeBlocks - Ninja" (recommended, needs [Ninja](#optional-ninja-build-system)) or "CodeBlocks - NMake".
144
148
Keep "Use default native compilers" and press "Finish".
145
149
146
-
7. Fix eventual dependency errors by following CMake messages (see Troubleshoot section below). Do not worry about warnings.
150
+
8. Fix eventual dependency errors by following CMake messages (see Troubleshoot section below). You may ignore warnings.
147
151
148
152
- e.g. define the `Eigen3_DIR` with the path where you installed Eigen
153
+
- Add the path to your venv site-packages to CMake by setting a path variable called `CMAKE_PREFIX_PATH=C:\path\to\sofa-venv\Lib\site-packages`
149
154
150
-
8. (optional) Customize SOFA via CMake variables
155
+
9. (optional) Customize SOFA via CMake variables
151
156
152
157
- choose the build type by setting CMAKE_BUILD_TYPE to "Release" or "RelWithDebInfo" (recommended) or "Debug"
153
158
- activate or deactivate plugins: see PLUGIN_XXX variables
154
159
- activate or deactivate features: see SOFA_XXX variables
155
160
Do not forget to **Configure** again to check if your changes are valid.
156
161
**_NOTE_**: here is an [exhaustive list of plugins](../activate-plugins/) that can be activated for an in-tree compilation.
157
162
158
-
9. When you are ready, run **Generate**. In the build directory, this will create a Visual Studio project (.sln) or a Makefile depending on the generator you chose at step 4.
163
+
10. When you are ready, run **Generate**. In the build directory, this will create a Visual Studio project (.sln) or a Makefile depending on the generator you chose at step 4.
159
164
160
165
161
166
## Compile
@@ -181,7 +186,9 @@ Time for a coffee!
181
186
To solve Qt detection errors, click on **Add Entry** and add
182
187
`CMAKE_PREFIX_PATH` with path to your Qt directory (navigate until msvcXXXX_XX directory).
0 commit comments