murray
murray

Reputation: 787

How add channel for wolframclient using conda?

I want to use the wolframclient Python package in Mathematica. The docs suggest using pip install wolframclient.

However, my main Python installation is within conda, so I do not want to use pip, but instead a standard conda install wolframclient. (The problem with using pip is that the added package's dependencies may interfere with what conda has already installed and knows about.)

The wolframclient package is at https://pypi.org/project/wolframclient/. But by default conda does not know about pypi.org. I tried the command conda config --add channels pipy, but conda install wolframclient says the channel is "not accessible or is invalid".

I think the problem is that the files at https://pypi.org/project/wolframclient/ are not already in the form of a conda package.

How might one proceed?

Upvotes: 2

Views: 125

Answers (2)

Matt Groth
Matt Groth

Reputation: 714

I have created a conda build of wolframclient (current version: 1.1.4).

Upvotes: 0

FlyingTeller
FlyingTeller

Reputation: 20482

I think the problem is that the files at https://pypi.org/project/wolframclient/ are not already in the form of a conda package.

Yes, very precisely noted. Conda packages contain information about how to built in different format than pypi packages, which are made for pip.

In the case you describe, you ahve several options:

  1. Create a seperate environment for wolframclient and use pip install wolframclient in there. Yes, pip and conda do not always get along, but by creating a virtual environment you have no risk of breaking other stuff and pip will be happy installing wolframclient for you
  2. Check the wolframclient package on pypi and install the dependencies using conda before installing wolframclient with pip which might minimize the risk of having to many packages downloaded by pip
  3. Download the source code of wolframclient and built it into a local conda package using conda build and this guide and then use conda install to install the locally built package

Upvotes: 3

Related Questions