theislab / cpa

The Compositional Perturbation Autoencoder (CPA) is a deep generative framework to learn effects of perturbations at the single-cell level. CPA performs OOD predictions of unseen combinations of drugs, learns interpretable embeddings, estimates dose-response curves, and provides uncertainty estimates.
BSD 3-Clause "New" or "Revised" License
76 stars 17 forks source link

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

Open twytock opened 4 months ago

twytock commented 4 months ago

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