install azureml-sdk[automl] fail on linux because of onnxruntime
I have an error installing automl :
pip install --upgrade azureml-sdk[automl]
I have got this error :
...
Collecting onnx<=1.6.0,>=1.5.0
Using cached onnx-1.6.0.tar.gz (3.1 MB)
ERROR: Command errored out with exit status 1:
command: /home/lab/anaconda3/envs/azure/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ncwzmszr/onnx/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ncwzmszr/onnx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-irlrh07j
cwd: /tmp/pip-install-ncwzmszr/onnx/
Complete output (6 lines):
fatal: ni ceci ni aucun de ses répertoires parents n'est un dépôt git : .git
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ncwzmszr/onnx/setup.py", line 72, in <module>
assert CMAKE, 'Could not find "cmake" executable!'
AssertionError: Could not find "cmake" executable!
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I also try to install onnx using :
conda install -c conda-forge onnx
In this case, I have the following error :
ERROR: Could not find a version that satisfies the requirement onnxruntime==1.0.0 (from azureml-automl-runtime~=1.13.0->azureml-train-automl~=1.13.0; extra == "automl"->azureml-sdk[automl]) (from versions: 1.2.0, 1.3.0, 1.4.0)
ERROR: No matching distribution found for onnxruntime==1.0.0 (from azureml-automl-runtime~=1.13.0->azureml-train-automl~=1.13.0; extra == "automl"->azureml-sdk[automl])
@kexugit can you please look into this?
@kexugit can you please look into this?
@deepakmukunthu I think you got the wrong alias?
Hi @jtobelem-simplon, Thanks for your feedback. Are you using python 3.8? Currently Azure ML is not officially supporting py 3.8 yet, you might hit issues in some places.
For this particular error, onnx run time 1.0 is not supporting 3.8, in the upcoming AzureML release - 1.15.0 we will upgrade to Onnx 1.3.0 which will be compatible with py3.8 and mitigate this installation error. However you may hit other issues in py3.8, since whole AML is not onboarding 3.8 yet.
Thank you @xuke444, yes I was using python 3.8. It is now working installing azureml-automl-runtime and azureml-train-automl-runtime.
I have now a bunch of new errors for this env :
name: azure
channels:
- conda-forge
- defaults
dependencies:
- python=3.7
- pip
- jupyter
- jupyter_contrib_nbextensions
- pandas
- matplotlib
- scikit-learn
- numpy
- pip:
- azureml-sdk
- azureml-automl-runtime
- azureml-train-automl-runtime
- azureml-widgets
Here are my errors :
ValidationException: ValidationException:
Message: Please install specific versions of packages: We validated this package with azure-mgmt-keyvault<=2.2.0 but your environment has azure-mgmt-keyvault 7.0.0.;We validated this package with azure-mgmt-storage<=11.2.0 but your environment has azure-mgmt-storage 16.0.0.;We validated this package with boto3<=1.14.59 but your environment has boto3 1.15.6.;We validated this package with botocore<=1.17.59 but your environment has botocore 1.18.6.;We validated this package with cffi<=1.14.2 but your environment has cffi 1.14.3.;We validated this package with cryptography<=3.1 but your environment has cryptography 3.1.1.;We validated this package with dotnetcore2<=2.1.14 but your environment has dotnetcore2 2.1.16.;We validated this package with importlib-metadata<=1.7.0 but your environment has importlib-metadata 2.0.0.;We validated this package with tqdm<=4.48.2 but your environment has tqdm 4.50.0.;We validated this package with zipp<=3.1.0 but your environment has zipp 3.2.0.
When executing this sample code :
from azureml.core.experiment import Experiment
from azureml.widgets import RunDetails
print('Submitting Auto ML experiment...')
automl_experiment = Experiment(ws, 'titanic_automl')
automl_run = automl_experiment.submit(automl_config)
RunDetails(automl_run).show()
automl_run.wait_for_completion(show_output=True)
If not related, I will open a new issue. Thks.
Hi @jtobelem-simplon It seems your yaml file is outdated. More than one month old. Do you mind pull the latest yml from this repo? https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/automated-machine-learning/automl_env.yml
Or use automl setup script to automatically create conda env https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/automated-machine-learning/automl_setup.cmd
@jtobelem-simplon can you let us know if you are still facing the issue described above? If not, I will close this issue.
Hello, I tried using the automl_setup.cmd file above to create a conda environment. 2 observations/questions -
- This installs Python 3.6.7. Any reason such an old version of Python is used?
- When trying to connect to a workspace, Workspace.from_config(), I receive an error - cffi library '_openssl' has no function, constant or global variable named 'CRYPTOGRAPHY_PACKAGE_VERSION'. Doing a bit of research, it appears this is due to the fact the installed version of OpenSSL is 1.0.x (e.g., https://www.tutorialexample.com/fix-attributeerror-cffi-library-_openssl-has-no-function-constant-or-global-variable-named-cryptography_has_ecdh/). I tried to upgrade to OpenSSL 1.1.x, but received multiple errors (UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment.....). Is there another way to resolve this issue?
@tylercmsft automl_setup.cmd installs Python 3.6.7 in order to support all the dependencies for a full local automl environment for training and inference. If you just need to submit remote runs, you can just install azureml-sdk, which supports remote training and inference. This support Python 3.7 or 3.8. The sample notebook auto-ml-regression-model-proxy.ipynb can be used without the full automl environment.
I just tested automl_setup.cmd and didn't get the error that you see. I tested on Windows, have conda 4.8.5 and used the latest automl_setup.cmd, automl_env.yml and check_conda_version.py files from GitHub. The new environment that I created had openssl 1.0.2u.
Are you running on Windows or Linux? What conda version are you using (as reported by conda -V) ? Did you get the latest setup files from GitHub (does the file automl_env.yml contain validated-requirements/1.17.0)?
Hello, thanks for the reply; I am running on Windows; the conda version is 4.8.3. I cloned the MachineLearningNotebooks repository yesterday (last line of .yml file - - -r https://automlcesdkdataresources.blob.core.windows.net/validated-requirements/1.17.0/validated_win32_requirements.txt [--no-deps]. My goal is to train local.
My environment also has openssl 1.0.2.u. But, that seems to be the problem (I am not a Python expert - but I found the link above which suggested that is the problem...). When I hit Workspace.from_config(), I see the openssl error (complete error attached - don't get tripped up by the install path - which says Anaconda38 - the python version, verified in Jupyter Notebook, is 3.6.7). OpenSSL_Error.txt
Should I update conda and try again? Would that even make a difference?
@tylercmsft Thanks for the information.
I tested with conda version 4.8.3 and it still worked for me. So, I don't think that updating would help.
I also checked the openssl error in the log. The failing line refers to lib.CRYPTOGRAPHY_PACKAGE_VERSION. lib is imported from cryptography.hazmat.bindings._openssl, which is in the same package. It looks like there is some corruption of this package in your environment.
I also noticed that you are using the default automl environment name, "azure_automl".
Can you try creating a new conda environment again with a different environment name?
You can do this with the command: automl_setup myenv
where myenv is any name you choose.
When you try the notebook again on the new environment, remember to select the kernel corresponding to the new environment.
Hello @jeff-shepherd, creation of a new, named environment seems to be doing the trick! Thanks for the suggestion.
#please-close