Repository navigation
Expand file tree
/
Copy pathINSTALL
More file actions
124 lines (88 loc) · 2.58 KB
/
Copy pathINSTALL
File metadata and controls
124 lines (88 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
## Installation of simuPOP
NOTE: The following instructions can be out of date due to the evolution of operating systems, Python, and
the Python tool chain. Please [submit an issue](https://github.com/BoPeng/simuPOP/issues) if you fail to
install simuPOP with the provided instructions, and/or submit a PR to update these instructions.
### Install using conda
If you have Anaconda installed, you can install simuPOP with command
```
conda install -c conda-forge simuPOP
```
### Install from PyPI
```
pip install simuPOP
```
### Compile from source
If you are working with a development version of simuPOP or an unsupported platform, you may need to install simuPOP from source.
#### Requirements
- Python 3.9 or later
- C/C++ compiler that supports the `c++17` standard
- CMake 3.20 or later
- SWIG 4.0 or later
- zlib development headers
#### Checkout the simuPOP source code
Using any git client, checkout simuPOP from https://github.com/BoPeng/simuPOP.
```
git clone https://github.com/BoPeng/simuPOP.git
cd simuPOP
```
#### Linux
Linux systems generally have gcc installed. To compile simuPOP from source:
1. Install system dependencies:
```
sudo apt-get install zlib1g-dev cmake swig ninja-build
```
2. Install Python build dependencies:
```
pip install scikit-build-core cmake ninja
```
3. Build and install:
```
pip install .
```
For development/editable install:
```
pip install -e .
```
#### macOS
1. Install system dependencies via Homebrew:
```
brew install cmake swig libomp ninja
```
2. Install Python build dependencies:
```
pip install scikit-build-core cmake ninja
```
3. Build and install (set OpenMP path for CMake):
```
export OpenMP_ROOT=$(brew --prefix libomp)
pip install .
```
#### Windows
You will need a C++ compiler from Visual Studio. A community version can be downloaded from Microsoft free of charge.
1. Install Visual Studio 2022 with C++ build tools
2. Install SWIG (using Chocolatey or download from https://swig.org):
```
choco install swig
```
3. Install Python build dependencies:
```
pip install scikit-build-core cmake ninja
```
4. Build and install:
```
pip install .
```
### Build Options
You can pass CMake options during build:
```
# Disable OpenMP support
pip install . --config-settings=cmake.define.USE_OPENMP=OFF
# Verbose build output
pip install -v .
```
### Troubleshooting
If you encounter build errors:
1. Ensure all dependencies are installed and accessible in your PATH
2. Try a clean build by removing any existing `build/` directory
3. Use verbose mode (`pip install -v .`) to see detailed build output
4. Check that your compiler supports C++17