Installing error
Closed this issue · 5 comments
When installing mrsimulator from pip it gives this long error.
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [51 lines of output]
:14: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
Using python version 3.11.7
mrsimulator version 0.7.0
3.11.7 | packaged by Anaconda, Inc. | (main, Dec 15 2023, 18:05:47) [MSC v.1916 64 bit (AMD64)]
Found Python installation: C:\Users\MAS-NMR\anaconda3
['C:\\Users\\MAS-NMR\\anaconda3\\Library\\include', 'C:\\Users\\MAS-NMR\\anaconda3\\Library\\include\\openblas', 'C:\\Users\\MAS-NMR\\anaconda3\\include', 'src/c_lib/include/', 'C:\\Users\\MAS-NMR\\AppData\\Local\\Temp\\pip-build-env-3rhpmt77\\overlay\\Lib\\site-packages\\numpy\\core\\include']
['C:\\Users\\MAS-NMR\\anaconda3\\Library\\lib']
['fftw3', 'openblas']
['/DUSE_OPENBLAS']
['-Wl']
Traceback (most recent call last):
File "C:\Users\MAS-NMR\anaconda3\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\MAS-NMR\anaconda3\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\MAS-NMR\anaconda3\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 149, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-3rhpmt77\overlay\Lib\site-packages\setuptools\build_meta.py", line 366, in prepare_metadata_for_build_wheel
self.run_setup()
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-3rhpmt77\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-3rhpmt77\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 408, in <module>
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-3rhpmt77\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-3rhpmt77\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 159, in setup
dist.parse_config_files()
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-3rhpmt77\overlay\Lib\site-packages\setuptools\dist.py", line 627, in parse_config_files
pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-3rhpmt77\overlay\Lib\site-packages\setuptools\config\pyprojecttoml.py", line 67, in apply_configuration
config = read_configuration(filepath, True, ignore_option_errors, dist)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-3rhpmt77\overlay\Lib\site-packages\setuptools\config\pyprojecttoml.py", line 128, in read_configuration
validate(subset, filepath)
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-3rhpmt77\overlay\Lib\site-packages\setuptools\config\pyprojecttoml.py", line 56, in validate
raise ValueError(f"{error}\n{summary}") from None
ValueError: invalid pyproject.toml config: `project`.
configuration error: `project` must contain ['version'] properties
[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.
and when i try to install from source:
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [193 lines of output]
:14: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
Using python version 3.11.7
mrsimulator version 0.7.0
3.11.7 | packaged by Anaconda, Inc. | (main, Dec 15 2023, 18:05:47) [MSC v.1916 64 bit (AMD64)]
Found Python installation: C:\Users\MAS-NMR\anaconda3
['C:\\Users\\MAS-NMR\\anaconda3\\include', 'C:\\Users\\MAS-NMR\\anaconda3\\Library\\include', 'C:\\Users\\MAS-NMR\\anaconda3\\Library\\include\\openblas', 'src/c_lib/include/', 'C:\\Users\\MAS-NMR\\AppData\\Local\\Temp\\pip-build-env-63l_2iyk\\overlay\\Lib\\site-packages\\numpy\\core\\include']
['C:\\Users\\MAS-NMR\\anaconda3\\Library\\lib']
['openblas', 'fftw3']
['/DUSE_OPENBLAS']
['-Wl']
C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:76: _MissingDynamic: `description` defined outside of `pyproject.toml` is ignored.
!!
********************************************************************************
The following seems to be defined outside of `pyproject.toml`:
`description = 'A python toolbox for simulating fast real-time solid-state NMR spectra.'`
According to the spec (see the link below), however, setuptools CANNOT
consider this value unless `description` is listed as `dynamic`.
https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table
To prevent this problem, you can list `description` under `dynamic` or alternatively
remove the `[project]` table from your file and rely entirely on other means of
configuration.
********************************************************************************
!!
_handle_missing_dynamic(dist, project_table)
C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:76: _MissingDynamic: `readme` defined outside of `pyproject.toml` is ignored.
!!
********************************************************************************
The following seems to be defined outside of `pyproject.toml`:
`readme = '# The Mrsimulator project\n\n| | |\n| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Deployment | [](https://pypi.python.org/pypi/mrsimulator)  |\n| Build Status | [](https://github.com/deepanshs/mrsimulator/actions) [](https://mrsimulator.readthedocs.io/en/stable/) |\n| License | [](https://opensource.org/licenses/BSD-3-Clause) |\n| Metrics | [](https://lgtm.com/projects/g/deepanshs/mrsimulator/alerts/) [](https://lgtm.com/projects/g/deepanshs/mrsimulator/context:python) [](https://codecov.io/gh/deepanshs/mrsimulator) [](https://www.codefactor.io/repository/github/deepanshs/mrsimulator) |\n\nShortly after the birth of Nuclear Magnetic Resonance (NMR) spectroscopy, it was realized that spin\nand spatial degrees of freedom could be manipulated on a time scale faster than the coherence\nlifetimes of the nuclear spin transitions. This led to an explosion of multi-pulse and sample\nreorientation methodologies in magnetic resonance for probing the structure and dynamics of matter\nover a wide range of length and time scales.\n\nNumerical simulations of the NMR spectra from these methods have long been a critical\npart of their analyses. The most robust and rigorous numerical approaches employ the full density\noperator, ideal for dealing with finite pulse effects, weak to intermediate to strong couplings,\nnon-commuting Hamiltonians, and relaxation and exchange processes. However, such approaches can be\nhighly inefficient, particularly when Hamiltonians commute, pulses are ideal, and transverse relaxation\ncan be treated as an ad-hoc line broadening. ``mrsimulator``, an open-source python package, achieves\nhigh benchmarks in spectral simulations and analyses by limiting itself to these simpler situations.\nFortunately, working within this limit only prevents ``mrsimulator`` from modeling spectra of a small\nfraction of popular NMR methods. The efficiency gains with this approach over conventional density\noperator simulations are tremendous.\n\n**Why use mrsimulator?**\n\n- It is open-source and free.\n- It is a fast and versatile solid-state NMR simulator of one and two-dimensional static, MAS,\n and VAS spectra of nuclei experiencing chemical shift (nuclear shielding) and quadrupolar\n coupling interactions.\n- It includes simulations of weakly coupled nuclei experiencing J and dipolar couplings.\n- It is fully documented with a stable and simple API and is easily incorporated into your\n python scripts and web apps.\n- It is compatible with modern python packages, such as scikit-learn, Keras, etc.\n- Packages using mrsimulator:\n - [mrinversion](https://mrinversion.readthedocs.io/en/stable/)\n\n## Install\n\n```sh\npip install mrsimulator\n```\n\nPlease refer to our [installation documentation](https://mrsimulator.readthedocs.io/en/stable/installation/users.html) for details.\n\n#### A 1D static and MAS example\n\n```py\nfrom mrsimulator import Simulator, SpinSystem, Site\nfrom mrsimulator.method.lib import BlochDecaySpectrum\nimport matplotlib.pyplot as plt\n\n# Make Site and SpinSystem objects\nH_site = Site(isotope="1H", shielding_symmetric={"zeta": 13.89, "eta": 0.25})\nspin_system = SpinSystem(sites=[H_site])\n\n# Make static and MAS one-pulse acquire Method objects\nstatic = BlochDecaySpectrum(channels=["1H"] )\nmas = BlochDecaySpectrum(channels=["1H"], rotor_frequency=1000) # in Hz\n\n# Setup and run the Simulation object\nsim = Simulator(spin_systems=[spin_system], methods=[static, mas])\nsim.run()\n\n# Plot the spectra\nfig, ax = plt.subplots(1, 2, figsize=(6, 3), subplot_kw={"projection": "csdm"})\nax[0].plot(sim.methods[0].simulation.real, color="black", linewidth=1)\nax[0].set_title("Static")\nax[1].plot(sim.methods[1].simulation.real, color="black", linewidth=1)\nax[1].set_title("MAS")\nplt.tight_layout()\nplt.show()\n```\n\nThis should produce the following figure.\n\n<img src="docs/_static/test_file.png" width="800" />\n\n<!--  -->\n\n---\n\n**Check out our extensive [documentation](https://mrsimulator.readthedocs.io/en/stable/index.html) and more example.**\n\n[](https://mrsimulator.readthedocs.io/en/stable/examples/index.html)\n[](https://mrsimulator.readthedocs.io/en/stable/fitting/index.html)\n\n---\n\n## Features\n\nThe `mrsimulator` package currently offers the following\n\n- **Fast simulation** of one and two-dimensional solid-state NMR spectra.\n\n- Simulation of **coupled and uncoupled spin system**\n\n - for spin I=1/2, and quadrupole I>1/2 nuclei\n - at arbitrary macroscopic magnetic flux density\n - at arbitrary rotor angles\n - at arbitrary spinning frequency\n\n- A library of **NMR methods**,\n\n - 1D Bloch decay spectrum\n - 1D Bloch decay central transition spectrum\n - 2D Multi-Quantum Variable Angle Spinning (MQ-VAS)\n - 2D Satellite-transition Variable Angle Spinning (MQ-VAS)\n - 2D isotropic/anisotropic sideband correlation spectrum (e.g. PASS and MAT)\n - 2D Magic Angle Flipping (MAF)\n - 2D Dynamic Angle Spinning (DAS)\n - Custom user-defined methods (Method)\n\n- **Models** for tensor parameter distribution in amorphous materials.\n\n - Czjzek\n - Extended Czjzek\n - Custom user-defined models\n\nFor more information, refer to the\n[documentation](https://mrsimulator.readthedocs.io/en/stable/).\n\n## Reporting Bugs\n\nSubmit bug reports or feature requests on the [Github issue tracker](https://github.com/deepanshs/mrsimulator/issues).\n\nDiscussions are welcome on the [Github discussion](https://github.com/deepanshs/mrsimulator/discussions) page.\n\n## How to cite\n\nIf you use mrsimulator in your publication, please consider citing the following.\n\n- Deepansh J. Srivastava, Matthew Giammar, Maxwell C. Venetos, Shyam Dwaraknath, Philip J. Grandinetti, & Alexis McCarthy. (2021). mrsimulator: v0.6.1. Zenodo. https://doi.org/10.5281/zenodo.5559730\n\n- Srivastava DJ, Vosegaard T, Massiot D, Grandinetti PJ (2020) Core Scientific Dataset Model: A lightweight and portable model and file format for multi-dimensional scientific dataset. PLOS ONE 15(1): e0225953. https://doi.org/10.1371/journal.pone.0225953\n\n_Additionally, if you use lmfit for least-squares fitting, consider citing the lmfit package._ Zenodo. https://doi.org/10.5281/zenodo.4516651\n'`
According to the spec (see the link below), however, setuptools CANNOT
consider this value unless `readme` is listed as `dynamic`.
https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table
To prevent this problem, you can list `readme` under `dynamic` or alternatively
remove the `[project]` table from your file and rely entirely on other means of
configuration.
********************************************************************************
!!
_handle_missing_dynamic(dist, project_table)
C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:76: _MissingDynamic: `license` defined outside of `pyproject.toml` is ignored.
!!
********************************************************************************
The following seems to be defined outside of `pyproject.toml`:
`license = 'BSD-3-Clause'`
According to the spec (see the link below), however, setuptools CANNOT
consider this value unless `license` is listed as `dynamic`.
https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table
To prevent this problem, you can list `license` under `dynamic` or alternatively
remove the `[project]` table from your file and rely entirely on other means of
configuration.
********************************************************************************
!!
_handle_missing_dynamic(dist, project_table)
C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:76: _MissingDynamic: `authors` defined outside of `pyproject.toml` is ignored.
!!
********************************************************************************
The following seems to be defined outside of `pyproject.toml`:
`authors = 'Deepansh J. Srivastava'`
According to the spec (see the link below), however, setuptools CANNOT
consider this value unless `authors` is listed as `dynamic`.
https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table
To prevent this problem, you can list `authors` under `dynamic` or alternatively
remove the `[project]` table from your file and rely entirely on other means of
configuration.
********************************************************************************
!!
_handle_missing_dynamic(dist, project_table)
C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:76: _MissingDynamic: `classifiers` defined outside of `pyproject.toml` is ignored.
!!
********************************************************************************
The following seems to be defined outside of `pyproject.toml`:
`classifiers = ['Intended Audience :: Science/Research', 'Intended Audience :: Education', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Development Status :: 4 - Beta', 'License :: OSI Approved :: BSD License', 'Programming Language :: C', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Topic :: Education', 'Topic :: Scientific/Engineering :: Chemistry']`
According to the spec (see the link below), however, setuptools CANNOT
consider this value unless `classifiers` is listed as `dynamic`.
https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table
To prevent this problem, you can list `classifiers` under `dynamic` or alternatively
remove the `[project]` table from your file and rely entirely on other means of
configuration.
********************************************************************************
!!
_handle_missing_dynamic(dist, project_table)
C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:76: _MissingDynamic: `scripts` defined outside of `pyproject.toml` is ignored.
!!
********************************************************************************
The following seems to be defined outside of `pyproject.toml`:
`scripts = ['mrsimulator=mrsimulator.__main__:run']`
According to the spec (see the link below), however, setuptools CANNOT
consider this value unless `scripts` is listed as `dynamic`.
https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table
To prevent this problem, you can list `scripts` under `dynamic` or alternatively
remove the `[project]` table from your file and rely entirely on other means of
configuration.
********************************************************************************
!!
_handle_missing_dynamic(dist, project_table)
C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:76: _MissingDynamic: `dependencies` defined outside of `pyproject.toml` is ignored.
!!
********************************************************************************
The following seems to be defined outside of `pyproject.toml`:
`dependencies = ['numpy>=1.17', 'csdmpy>=0.4.1', 'pydantic>=1.9', 'monty>=2.0.4', 'typing-extensions>=3.7', 'psutil>=5.4.8', 'joblib>=1.0.0', 'pandas>=1.1.3', 'lmfit>=1.0.2', 'matplotlib>=3.3.4']`
According to the spec (see the link below), however, setuptools CANNOT
consider this value unless `dependencies` is listed as `dynamic`.
https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table
To prevent this problem, you can list `dependencies` under `dynamic` or alternatively
remove the `[project]` table from your file and rely entirely on other means of
configuration.
********************************************************************************
!!
_handle_missing_dynamic(dist, project_table)
Traceback (most recent call last):
File "C:\Users\MAS-NMR\anaconda3\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\MAS-NMR\anaconda3\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\MAS-NMR\anaconda3\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 149, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\build_meta.py", line 366, in prepare_metadata_for_build_wheel
self.run_setup()
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 408, in <module>
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 159, in setup
dist.parse_config_files()
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\dist.py", line 627, in parse_config_files
pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\config\pyprojecttoml.py", line 68, in apply_configuration
return _apply(dist, config, filepath)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py", line 57, in apply
_apply_project_table(dist, config, root_dir)
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py", line 83, in _apply_project_table
corresp(dist, value, root_dir)
File "C:\Users\MAS-NMR\AppData\Local\Temp\pip-build-env-63l_2iyk\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py", line 164, in _long_description
file = val.get("file") or []
^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
[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.
- OS: Windows
mrsimulator
version: 0.7.0
Im very new to this please help. I followed all the instructions on the page.
Hi,
Can you try installing it on Python 3.10?
The error is likely because you are installing it on Python 3.11. For mrsimulator version 0.7.0, PyPI hosts build up to Python v3.10. This will be resolved with the next release of mrsimulator. Please feel free to ask questions if you find any other issues. Happy to help.
Deepansh
I can’t see the png file, it might not have uploaded.
There is a known pydantic issue and you might be seeing that.
#294
you can read the discussion here. It might solve some of the issues.
All these issues will be resolved in the upcoming release.
Deepansh
Hi Mirtel,
Are you still having issues with the installation? If not, I would like to close this issue.
Thanks,
Deepansh
closing because there hasn't been any response in a month.