daducci / AMICO

Accelerated Microstructure Imaging via Convex Optimization (AMICO) from diffusion MRI data
Other
104 stars 62 forks source link

ImportError during installation #175

Closed BastienCagna closed 1 year ago

BastienCagna commented 1 year ago

Hello, I'm trying to install amico using pip with python3.10 and pip23.3.1 and get the following error:

$ ./venv/bin/pip install amico
Collecting amico
  Downloading amico-1.0.1.tar.gz (7.9 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      Traceback (most recent call last):
        File "/home/bastien.cagna/soft/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/bastien.cagna/soft/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/bastien.cagna/soft/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-oxfwq9ed/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-oxfwq9ed/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-oxfwq9ed/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-oxfwq9ed/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 2, in <module>
        File "/tmp/pip-install-r0ggwp6m/amico_aa93615ea922474f8cdf3f276d1de829/amico/__init__.py", line 1, in <module>
          from amico import Amico
      ImportError: cannot import name 'Amico' from partially initialized module 'amico' (most likely due to a circular import) (/tmp/pip-install-r0ggwp6m/amico_aa93615ea922474f8cdf3f276d1de829/amico/__init__.py)
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Does any one had this problem? It may be due to python or pip update?

BastienCagna commented 1 year ago

Hmmm sorry. amico does not refer to this package using pip. Is this package registered with an other name?

daducci commented 1 year ago

Hi @BastienCagna ,

the name on PYPI is dmri-amico, so you should install it via: pip install dmri-amico. Hope this solves your problem.

Best, Ale

BastienCagna commented 1 year ago

Yes. It works perfectly well. Thank you Ale!