Skip to content

Commit e543e2a

Browse files
Fix malformed pip commands that combine extras with a VCS direct reference. (pep508) (#65)
Before: pip install "optimum-onnx[onnxruntime]"@git+https://github.com/huggingface/optimum-onnx.git pip install "optimum-onnx[onnxruntime-gpu]"@git+https://github.com/huggingface/optimum-onnx.git After (PEP 508–compliant): pip install "optimum-onnx[onnxruntime] @ git+https://github.com/huggingface/optimum-onnx.git" pip install "optimum-onnx[onnxruntime-gpu] @ git+https://github.com/huggingface/optimum-onnx.git" This prevents copy/paste install failures. Note: The Hugging Face docs page also shows the malformed command; that’s maintained on the docs site and will need a separate fix (or it may auto-sync from docs/source in this repo—if so, your README fix might need mirroring there). Example of the issue on the site: “Installation” page for Optimum ONNX. (see https://huggingface.co/docs/optimum-onnx/installation)
1 parent 671b84f commit e543e2a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
Before you begin, make sure you install all necessary libraries by running:
1515

1616
```bash
17-
pip install "optimum-onnx[onnxruntime]"@git+https://github.com/huggingface/optimum-onnx.git
17+
pip install "optimum-onnx[onnxruntime] @ git+https://github.com/huggingface/optimum-onnx.git"
1818
```
1919

2020
If you want to use the [GPU version of ONNX Runtime](https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#cuda-execution-provider), make sure the CUDA and cuDNN [requirements](https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements) are satisfied, and install the additional dependencies by running :
2121

2222
```bash
23-
pip install "optimum-onnx[onnxruntime-gpu]"@git+https://github.com/huggingface/optimum-onnx.git
23+
pip install "optimum-onnx[onnxruntime-gpu] @ git+https://github.com/huggingface/optimum-onnx.git"
2424
```
2525

2626
To avoid conflicts between `onnxruntime` and `onnxruntime-gpu`, make sure the package `onnxruntime` is not installed by running `pip uninstall onnxruntime` prior to installing Optimum.

docs/source/installation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ specific language governing permissions and limitations under the License.
1616
To install Optimum ONNX, you can do:
1717

1818
```bash
19-
pip install "optimum-onnx[onnxruntime]"@git+https://github.com/huggingface/optimum-onnx.git
19+
pip install "optimum-onnx[onnxruntime] @ git+https://github.com/huggingface/optimum-onnx.git"
2020
```
2121

2222
Optimum ONNX is a fast-moving project, and you may want to install from source with the following command:

0 commit comments

Comments
 (0)