Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid dashes in "–extra-index-url" Installation instructions #41

Open
twytock opened this issue Feb 12, 2024 · 0 comments
Open

Invalid dashes in "–extra-index-url" Installation instructions #41

twytock opened this issue Feb 12, 2024 · 0 comments

Comments

@twytock
Copy link

twytock commented Feb 12, 2024

What I did:

I attempted to install cpa-tools proceeding according to the instructions on the Installation page.

System: Linux (Debian )
pytorch variant: cpu

I was able to successfully create a virtual environment by running:

conda create -n cpa python=3.9

And I invoked this newly created environment using:

conda activate cpa

My issue started when trying to install torch:

pip install torch==1.13.1+cpu –extra-index-url https://download.pytorch.org/whl/cpu

Expected behavior:

When copying the installation instructions for the CPU only version of pytorch, I expected to get:

Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cpu
Collecting torch==1.13.1+cpu
  Using cached https://download.pytorch.org/whl/cpu/torch-1.13.1%2Bcpu-cp39-cp39-linux_x86_64.whl (199.1 MB)
Collecting typing-extensions (from torch==1.13.1+cpu)
  Using cached typing_extensions-4.9.0-py3-none-any.whl.metadata (3.0 kB)
Using cached typing_extensions-4.9.0-py3-none-any.whl (32 kB)
Installing collected packages: typing-extensions, torch
Successfully installed torch-1.13.1+cpu typing-extensions-4.9.0

Observed behavior:
When copying this statement to the command line,

pip install torch==1.13.1+cpu –extra-index-url https://download.pytorch.org/whl/cpu

I obtained the error:

ERROR: Invalid requirement: '–extra-index-url'

An observer familiar with command line arguments will notice that it is unusual to have a long-form command line option with only a single dash ('-'). A keen observer will notice that the character on the installation page is, in fact, not an "en dash" ('-') but an "em dash" ('–'). I suspect that the author of the documentation intended for "--" to be entered, but that readthedocs interpreted this as an "em dash".

Suggested fix:

Please alter all instances of the "em dash" ('–') with two "en dashes" ('--') on the lines concerning the installation of pytorch. Replacing the offending character as described above resolved the issue for me:

pip install torch==1.13.1+cpu --extra-index-url https://download.pytorch.org/whl/cpu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant