How to pip install with wheel specifying extras?

Viewed 3135

I have a package with extras that I can typically install with the following command.

pip install package[extras]

However, I can also install the same package via wheels, specifying some wheel URL like the following.

pip install package_url.whl

Is it possible to also specify the extras when installing via wheel url, something in spirit?

pip install package_url.whl[extras]
1 Answers
pip install 'package_url.whl[extras]'

works. I added apostrophes to screen (escape) [] as they are shell metacharacters and I prefer to be on the safe side.

Related