0

I am trying to communicate with Watson Machine Learning from my local windows machine using vscode to run a jupyter notebook in a virtual enviroment but I cannot get it to work.

I installed

!pip install tensorflow
!pip install ibm_watson_machine_learning

I created and trained a keras model in the same notebook --> tensorflow definitly is installed and functioning. But when I run:

from ibm_watson_machine_learning import APIClient

LOCATION = 'https://us-south.ml.cloud.ibm.com'
API_KEY = 'xxx-this-is-my-api-key-xxx'


wml_credentials = {
    "apikey": API_KEY,
    "url": LOCATION
}

wml_client = APIClient(wml_credentials)

I get an error:

ImportError: The system lacks installations of pyspark, scikit-learn, pandas, xgboost, mlpipelinepy, ibmsparkpipeline and tensorflow. At least one of the libraries is required for the repository-client to be used`

Does anyone know what to do about that?

Maximilian Jesch
  • 623
  • 7
  • 16

1 Answers1

1

The solution was really simple. Watson Machine Learning does NOT support virtual enviroments. For some reason it checks your global enviroment for the installation it is looking for instead of the virtual enviroment that was used to run it :-/ --> use global env then everything works

Maximilian Jesch
  • 623
  • 7
  • 16