conan error when trying to install proposal on Ubuntu 20.04/22.04
Closed this issue · 4 comments
Since yesterday, it seems pip install proposal==7.5.0
fails during wheel building with the error RuntimeError: conan was not able to create a new profile named {name}.
The error occurs both on my local system on Ubuntu 22.04 on a clean python 3.10 venv, as well as on the NuRadioMC CI system under both Ubuntu 20.04 and 22.04 on Python 3.7. I'm not sure what's causing this, as until yesterday it seemed to be fine... It seems conan was updated this morning - presumably either the conan
commands need to be updated, or setup.py
needs to be fixed to an older version of conan
?
Full error output:
Building wheels for collected packages: proposal
Building wheel for proposal (pyproject.toml): started
Building wheel for proposal (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Building wheel for proposal (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [53 lines of output]
running bdist_wheel
running build
running build_ext
usage: conan profile [-h] [-v [V]] [--logger] {detect,list,path,show} ...
conan profile: error: argument subcommand: invalid choice: 'new' (choose from 'detect', 'list', 'path', 'show')
ERROR: Exiting with code: 2
Using conan to install dependencies. Set environment variable NO_CONAN to skip conan.
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 252, in build_wheel
metadata_directory)
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 414, in build_wheel
wheel_directory, config_settings)
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 398, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 158, in <module>
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/__init__.py", line 108, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/dist.py", line 1221, in run_command
super().run_command(command)
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 325, in run
self.run_command("build")
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/dist.py", line 1221, in run_command
super().run_command(command)
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 131, in run
self.run_command(cmd_name)
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/dist.py", line 1221, in run_command
super().run_command(command)
File "/tmp/pip-build-env-_2t9xeb8/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 88, in run
File "<string>", line 109, in build_cmake
File "<string>", line 50, in create_conan_profile
RuntimeError: conan was not able to create a new profile named {name}.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for proposal
ERROR: Could not build wheels for proposal, which is required to install pyproject.toml-based projects
Failed to build proposal
Fixed this by requiring conan<2.0
on https://github.com/sjoerd-bouma/PROPOSAL, I can make a PR or someone can just implement this / upgrade to conan 2.0.
For now, the simple fixed would be to fix conan to 1.x in pyproject.toml
if it is not easy to directly support conan 2