graalpython
graalpython copied to clipboard
Installation of mlflow is not working
Hi! I'm trying to install mlflow package in virtual environment, but installation process fails with error.
bin/pip install mlflow
compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/mnt/sda2/graalvm-ce-java11-22.1.0/venv/include -I/mnt/sda2/graalvm-ce-java11-22.1.0/languages/python/include -c'
graalvm-native-clang: _configtest.c
success!
removing: _configtest.c _configtest.o _configtest.o.d
C compiler: /mnt/sda2/graalvm-ce-java11-22.1.0/languages/llvm/native/bin/graalvm-native-clang -Wno-unused-command-line-argument -stdlib=libc++ -DNDEBUG -DGRAALVM_PYTHON_LLVM -D_GNU_SOURCE=1 -fPIC
compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/mnt/sda2/graalvm-ce-java11-22.1.0/venv/include -I/mnt/sda2/graalvm-ce-java11-22.1.0/languages/python/include -c'
graalvm-native-clang: _configtest.c
C compiler: /mnt/sda2/graalvm-ce-java11-22.1.0/languages/llvm/native/bin/graalvm-native-clang -Wno-unused-command-line-argument -stdlib=libc++ -DNDEBUG -DGRAALVM_PYTHON_LLVM -D_GNU_SOURCE=1 -fPIC
compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/mnt/sda2/graalvm-ce-java11-22.1.0/venv/include -I/mnt/sda2/graalvm-ce-java11-22.1.0/languages/python/include -c'
graalvm-native-clang: _configtest.c
/mnt/sda2/graalvm-ce-java11-22.1.0/languages/llvm/native/bin/graalvm-native-clang _configtest.o -o _configtest
removing: _configtest.c _configtest.o _configtest.o.d _configtest.c _configtest.o _configtest.o.d _configtest
Traceback (most recent call last):
File "/tmp/pip-install-y2c51dyc/numpy/numpy/core/setup_common.py", line 263, in check_long_double_representation
ltype = long_double_representation(pyod(obj))
File "/tmp/pip-install-y2c51dyc/numpy/numpy/core/setup_common.py", line 417, in long_double_representation
raise ValueError("Could not lock sequences (%s)" % saw)
ValueError: Could not lock sequences (None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-y2c51dyc/numpy/setup.py", line 443, in <module 'setup.py'>
setup_package()
File "/tmp/pip-install-y2c51dyc/numpy/setup.py", line 435, in setup_package
setup(**metadata)
File "/tmp/pip-install-y2c51dyc/numpy/numpy/distutils/core.py", line 171, in setup
return old_setup(**new_attr)
File "/mnt/sda2/graalvm-ce-java11-22.1.0/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/mnt/sda2/graalvm-ce-java11-22.1.0/languages/python/lib-python/3/distutils/core.py", line 148, in setup
dist.run_commands()
File "/mnt/sda2/graalvm-ce-java11-22.1.0/languages/python/lib-python/3/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/mnt/sda2/graalvm-ce-java11-22.1.0/languages/python/lib-python/3/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-y2c51dyc/numpy/numpy/distutils/command/install.py", line 62, in run
r = self.setuptools_run()
File "/tmp/pip-install-y2c51dyc/numpy/numpy/distutils/command/install.py", line 36, in setuptools_run
return distutils_install.run(self)
File "/mnt/sda2/graalvm-ce-java11-22.1.0/languages/python/lib-python/3/distutils/command/install.py", line 557, in run
self.run_command('build')
File "/mnt/sda2/graalvm-ce-java11-22.1.0/languages/python/lib-python/3/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/mnt/sda2/graalvm-ce-java11-22.1.0/languages/python/lib-python/3/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-y2c51dyc/numpy/numpy/distutils/command/build.py", line 47, in run
old_build.run(self)
File "/mnt/sda2/graalvm-ce-java11-22.1.0/languages/python/lib-python/3/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/mnt/sda2/graalvm-ce-java11-22.1.0/languages/python/lib-python/3/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/mnt/sda2/graalvm-ce-java11-22.1.0/languages/python/lib-python/3/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-y2c51dyc/numpy/numpy/distutils/command/build_src.py", line 142, in run
self.build_sources()
File "/tmp/pip-install-y2c51dyc/numpy/numpy/distutils/command/build_src.py", line 159, in build_sources
self.build_extension_sources(ext)
File "/tmp/pip-install-y2c51dyc/numpy/numpy/distutils/command/build_src.py", line 316, in build_extension_sources
sources = self.generate_sources(sources, ext)
File "/tmp/pip-install-y2c51dyc/numpy/numpy/distutils/command/build_src.py", line 369, in generate_sources
source = func(extension, build_dir)
File "/tmp/pip-install-y2c51dyc/numpy/numpy/core/setup.py", line 463, in generate_config_h
rep = check_long_double_representation(config_cmd)
File "/tmp/pip-install-y2c51dyc/numpy/numpy/core/setup_common.py", line 273, in check_long_double_representation
ltype = long_double_representation(pyod("_configtest"))
File "/tmp/pip-install-y2c51dyc/numpy/numpy/core/setup_common.py", line 417, in long_double_representation
raise ValueError("Could not lock sequences (%s)" % saw)
ValueError: Could not lock sequences (None)
----------------------------------------
ERROR: Command errored out with exit status 1: /mnt/sda2/graalvm-ce-java11-22.1.0/venv/bin/graalpython -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-y2c51dyc/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-y2c51dyc/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ltkrwdk9/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-jkuo6tgu/overlay --compile --install-headers /mnt/sda2/graalvm-ce-java11-22.1.0/venv/include/site/python3.8/numpy Check the logs for full command output.
WARNING: You are using pip version 20.1.1; however, version 22.1.2 is available.
You should consider upgrading via the '/mnt/sda2/graalvm-ce-java11-22.1.0/venv/bin/graalpython -m pip install --upgrade pip' command.
----------------------------------------
ERROR: Command errored out with exit status 1: /mnt/sda2/graalvm-ce-java11-22.1.0/venv/bin/graalpython /mnt/sda2/graalvm-ce-java11-22.1.0/venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-jkuo6tgu/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'wheel<0.38.0' 'setuptools<60.0.0' 'Cython>=0.29.18,<3.0' 'pybind11>=2.4.3,<2.9.0' 'pythran>=0.10.0,<0.11.0' 'numpy==1.19.2; python_version=='"'"'3.8'"'"' and platform_machine=='"'"'aarch64'"'"' and platform_python_implementation != '"'"'PyPy'"'"'' 'numpy==1.20.0; python_version=='"'"'3.8'"'"' and platform_machine=='"'"'arm64'"'"' and platform_system=='"'"'Darwin'"'"'' 'numpy==1.20.0; python_version=='"'"'3.9'"'"' and platform_machine=='"'"'arm64'"'"' and platform_system=='"'"'Darwin'"'"'' 'numpy==1.17.5; python_version=='"'"'3.8'"'"' and platform_machine=='"'"'s390x'"'"' and platform_python_implementation != '"'"'PyPy'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and (platform_machine!='"'"'arm64'"'"' or platform_system!='"'"'Darwin'"'"') and platform_machine!='"'"'aarch64'"'"' and platform_machine!='"'"'s390x'"'"' and platform_python_implementation != '"'"'PyPy'"'"'' 'numpy==1.19.3; python_version=='"'"'3.9'"'"' and (platform_machine!='"'"'arm64'"'"' or platform_system!='"'"'Darwin'"'"') and platform_python_implementation != '"'"'PyPy'"'"'' 'numpy==1.21.4; python_version=='"'"'3.10'"'"' and platform_python_implementation != '"'"'PyPy'"'"'' 'numpy; python_version>='"'"'3.11'"'"'' 'numpy; python_version>='"'"'3.8'"'"' and platform_python_implementation=='"'"'PyPy'"'"'' Check the logs for full command output.
I'm using last graalvm version 22.1.0. Am I doing something wrong or mlflow is just not supported?
Hi, @unit7-0, thank you for your interest in GraalPython. We haven't tested mlflow
but we know that recent version of numpy
don't work and the error seems to be from there. Could you please try installing numpy==1.16.4
first and then installing mlflow
?
@msimacek, I've just tried to install numpy==1.16.4
first as you suggested, but the output remained the same as above. It looks like pip is trying to download the newest version of numpy, despite that 1.16.4 is already installed.
bin/pip list
Package Version
---------- -------
hpy 0.0.3
numpy 1.16.4
pip 20.1.1
setuptools 47.1.0
Collecting numpy==1.17.3
WARNING: Cache entry deserialization failed, entry ignored
Downloading numpy-1.17.3.zip (6.4 MB)
That probably means that some of mlflow
's dependencies require higher version of numpy
(mlflow
itself doesn't seem to specify it). Then I'm afraid you will have to wait until we support newer numpy
. I believe @cosminbasca is currently working on that.