jamiet
jamiet

Reputation: 12334

What is Conda's equivalent of pip installing optional extra components?

I have a conda environment into which I'd like to install Jupyter for use with Google BigQuery.

Google provide documentation for using Jupyter with BigQuery at https://cloud.google.com/bigquery/docs/visualize-jupyter and at https://cloud.google.com/bigquery/docs/visualize-jupyter#install_the_client_libraries it is stated that the required dependencies can be installed using:

pip install --upgrade 'google-cloud-bigquery[bqstorage,pandas]'

However I am not using pip. I am using conda. I already have google-cloud-bigquery installed:

# conda list | grep bigquery
google-cloud-bigquery     2.29.0                   pypi_0    pypi
google-cloud-bigquery-storage-core 2.2.1              pyh44b312d_0    conda-forge

however I do not know how to install the optional extra subcomponents, bqstorage & pandas, that are specified in the pip install command. I know I can issue the same pip install command within my conda environment but I'm wondering if installation of these dependencies can be achieved using only conda.

In summary, how can I achieve the equivalent of pip install --upgrade 'google-cloud-bigquery[bqstorage,pandas]' using conda?

Upvotes: 1

Views: 955

Answers (2)

nrp1000
nrp1000

Reputation: 287

Shockingly, as of March 2024, conda does not support installation of optional extras in a manner equivalent to pip. Some related discussions:

https://stackoverflow.com/a/42587494/13089441

https://github.com/conda/conda/issues/7502

https://github.com/fractal-analytics-platform/fractal-tasks-core/issues/611

https://github.com/conda/conda/issues/2984

Upvotes: 0

jamiet
jamiet

Reputation: 12334

DOH! I just realised that the article I linked to provides the required conda command

conda install -c conda-forge google-cloud-bigquery \
  google-cloud-bigquery-storage \
  pandas \
  pyarrow

enter image description here

Upvotes: 2

Related Questions