qiskit-aer
qiskit-aer copied to clipboard
Unable to install qiskit-aer from source
Informations
- Qiskit Aer version: master branch
- Python version: 3.12.0
- Operating system: Ubuntu 22.04.3
What is the current behavior?
I am just trying to install the library from the master branch in order to contribute with a PR, but this happens:
...
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
/home/gianluca/anaconda3/envs/QiskitDevEnv/lib/python3.12/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
error: Multiple top-level packages discovered in a flat-layout: ['cmake', 'symengine'].
To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.
If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:
1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names
To find more information, look for "package discovery" on setuptools docs.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
...
Steps to reproduce the problem
I am simply trying to build qiskit-aer from source following this guide. The step which fails is:
pip install -r requirements-dev.txt
and gives the output provided below. I also tried re-installing with:
pip install --use-pep517 -r requirements-dev.txt
But this happens:
...
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
error: Multiple top-level packages discovered in a flat-layout: ['cmake', 'symengine'].
To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.
If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:
1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names
To find more information, look for "package discovery" on setuptools docs.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
...
What is the expected behavior?
I am expecting to have a clean installation of the developer dependencies.
Suggested solutions
Sincerly have no idea, I tried everything but the problem seems related to the code probably.
Same issue on Mac M2
% pip install qiskit
Collecting qiskit
Using cached qiskit-0.45.0-py3-none-any.whl.metadata (12 kB)
Collecting qiskit-terra==0.45.0 (from qiskit)
Using cached qiskit_terra-0.45.0-cp38-abi3-macosx_11_0_arm64.whl.metadata (12 kB)
Collecting rustworkx>=0.13.0 (from qiskit-terra==0.45.0->qiskit)
Using cached rustworkx-0.13.2-cp312-cp312-macosx_11_0_arm64.whl.metadata (10 kB)
Collecting numpy<2,>=1.17 (from qiskit-terra==0.45.0->qiskit)
Using cached numpy-1.26.2-cp312-cp312-macosx_11_0_arm64.whl.metadata (61 kB)
Collecting ply>=3.10 (from qiskit-terra==0.45.0->qiskit)
Using cached ply-3.11-py2.py3-none-any.whl (49 kB)
Collecting psutil>=5 (from qiskit-terra==0.45.0->qiskit)
Using cached psutil-5.9.6-cp38-abi3-macosx_11_0_arm64.whl.metadata (21 kB)
Collecting scipy>=1.5 (from qiskit-terra==0.45.0->qiskit)
Using cached scipy-1.11.4-cp312-cp312-macosx_12_0_arm64.whl.metadata (217 kB)
Collecting sympy>=1.3 (from qiskit-terra==0.45.0->qiskit)
Using cached sympy-1.12-py3-none-any.whl (5.7 MB)
Collecting dill>=0.3 (from qiskit-terra==0.45.0->qiskit)
Using cached dill-0.3.7-py3-none-any.whl.metadata (9.9 kB)
Collecting python-dateutil>=2.8.0 (from qiskit-terra==0.45.0->qiskit)
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting stevedore>=3.0.0 (from qiskit-terra==0.45.0->qiskit)
Using cached stevedore-5.1.0-py3-none-any.whl.metadata (2.2 kB)
Collecting symengine<0.10,>=0.9 (from qiskit-terra==0.45.0->qiskit)
Using cached symengine-0.9.2.tar.gz (85 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
/Users/geexie/anaconda3/envs/q_env/lib/python3.12/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
error: Multiple top-level packages discovered in a flat-layout: ['cmake', 'symengine'].
To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.
If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:
1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names
To find more information, look for "package discovery" on setuptools docs.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
hello, did you get any solution for this ? I am dealing with the same problem of installation
@Anoushka55 I didn't. Nobody answered to this issue right now.