1

I'm trying to load an existing azure workspace in RStudio Azure Compute Instance like it's shown in this link: https://azure.github.io/azureml-sdk-for-r/. But, after installing azuremlsdk package when I'm running this code azuremlsdk::install_azureml(). I'm getting this error :

Attempting uninstall: certifi  Found existing installation: certifi2016.9.26ERROR: Cannot uninstall 'certifi'. It is a distutilsinstalled project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.Error: Error installing package(s): 'azureml-sdk==1.10.0', 'numpy', 'pandas'

By referring to this link : https://learn.microsoft.com/en-us/azure/machine-learning/how-to-troubleshoot-environments; I tried to fix this error by running conda remove certifi through terminal of that Compute Instance & Jupyter Notebook of that Compute Instance. But, no luck.

Does anyone have any experience in resolving this issue. Please help.

sm925
  • 2,648
  • 1
  • 16
  • 28
  • I got the same error when creating a custom R Environment with Dockerfile. The steps to reproduce the bug are: 1. Install Miniconda (this installs certifi-2019.9.11) and 2. Install Azure ML R SDK (this tries to install certifi-2016.9.26). Very annoying, since the same Dockerfile I was using a couple of months ago, doesn't work anymore, although I haven't changed anything in the Dockerfile. – Lazer Dec 13 '21 at 08:43

2 Answers2

0

Azure ML has issues with Python versions and its dependency packages, make sure you are using Python package of 3.5 to 3.8 while installing these.

While installing azureml it will search for all the dependency packages and will install all of them, in this process there will be the version issues, like pandas, numpy.. with different pip versions.

From your stack trace looks like the error is happening when we install the packages like pandas numpy etc along with azureml-train-automl-client package so try to install them before hand by checking its versions which are dependent with you python versions packages.

Check the Azure ML documentation for installation of Azure ML Additional packages.

If you investigate them azureml-train-automl requires somes data science packages including pandas, numpy, and scikit-learn.

Kindly follow below commands for conda environment:

pip install azureml-train-automl
pip install --upgrade azureml-train-automl 
pip install show azureml-train-automl
SaiKarri-MT
  • 1,174
  • 1
  • 3
  • 8
0

It seems that the Python SDK installation conflicts with itself when using Python 3.6 (the default). I was able to install the SDK for Python 3.7:

azuremlsdk::install_azureml(conda_python_version = '3.7')

EDIT:

The above solution did not work for me anymore. However, I was able to install an updated version of the certifi package as follows:

conda activate r-reticulate # (after failed install, env should now exist)
conda remove certifi
conda install python=3.6

Now I can run azuremlsdk::install_azureml() in the R command line.

Lazer
  • 501
  • 4
  • 14