Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pip install with wheel specifying extras?

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]
like image 369
richliaw Avatar asked Sep 07 '18 19:09

richliaw


People also ask

How do I set pip to specify?

To install a specific version of a Python package you can use pip: pip install YourPackage==YourVersion . For example, if you want to install an older version of Pandas you can do as follows: pip install pandas==1.1. 3 .

What is wheel package in pip?

If you've installed a Python package using pip , then chances are that a wheel has made the installation faster and more efficient. Wheels are a component of the Python ecosystem that helps to make package installs just work. They allow for faster installations and more stability in the package distribution process.


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.

like image 162
phd Avatar answered Oct 02 '22 11:10

phd