Could not find a version that satisfies the requirement SimpleITK>=2.2.1 (from versions: 1.0.1, 1.2.0, 1.2.3, 1.2.4, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.1.1.2, 2.2.0)
时间: 2024-02-13 22:05:06 浏览: 24
If the `pip install "SimpleITK>=2.2.1"` command doesn't work and you receive the message "Could not find a version that satisfies the requirement SimpleITK>=2.2.1", it may be because SimpleITK version 2.2.1 or later is not available in the repository for your Python environment.
In this case, you can try building and installing SimpleITK from source. Here are the steps you can follow:
1. Download the SimpleITK source code from the official website: https://simpleitk.org/download/
2. Extract the downloaded archive to a directory of your choice.
3. Navigate to the extracted directory, and run the following command to configure the build:
```
cmake -DSimpleITK_BUILD_DISTRIBUTE=ON .
```
4. After the configuration is complete, run the following command to build SimpleITK:
```
cmake --build . --config Release --target install
```
5. After the build is complete, SimpleITK should be installed in your Python environment. You can verify this by running the following command:
```
python -c "import SimpleITK; print(SimpleITK.Version())"
```
This should output the version of SimpleITK that you just installed.