California-Planet-Search / radvel

General Toolkit for Modeling Radial Velocity Data
http://radvel.readthedocs.io
MIT License
57 stars 52 forks source link

RadVel pip Install Failure due to Inability to Build Wheel (Seemingly Unrelated to cython) #378

Closed literalcarys closed 1 year ago

literalcarys commented 1 year ago

Hi there. I created a fresh conda environment for a astrophysics course project, and require RadVel. However when I try to install it (after installing cython on the advice of the other thread), I am left with this message. Any help would be much appreciated.

Building wheels for collected packages: radvel Building wheel for radvel (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [103 lines of output] C:\Users\carys\anaconda3\envs\AstroProject\Lib\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)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-cpython-311
  creating build\lib.win-amd64-cpython-311\radvel
  copying radvel\basis.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\cli.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\driver.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\fitting.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\gp.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\kepler.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\likelihood.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\mcmc.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\model.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\orbit.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\posterior.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\prior.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\report.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\utils.py -> build\lib.win-amd64-cpython-311\radvel
  copying radvel\__init__.py -> build\lib.win-amd64-cpython-311\radvel
  creating build\lib.win-amd64-cpython-311\radvel\plot
  copying radvel\plot\mcmc_plots.py -> build\lib.win-amd64-cpython-311\radvel\plot
  copying radvel\plot\orbit_plots.py -> build\lib.win-amd64-cpython-311\radvel\plot
  copying radvel\plot\__init__.py -> build\lib.win-amd64-cpython-311\radvel\plot
  running egg_info
  writing radvel.egg-info\PKG-INFO
  writing dependency_links to radvel.egg-info\dependency_links.txt
  writing entry points to radvel.egg-info\entry_points.txt
  writing requirements to radvel.egg-info\requires.txt
  writing top-level names to radvel.egg-info\top_level.txt
  reading manifest file 'radvel.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE'
  writing manifest file 'radvel.egg-info\SOURCES.txt'
  C:\Users\carys\anaconda3\envs\AstroProject\Lib\site-packages\setuptools\command\build_py.py:201: _Warning: Package 'radvel.templates' is absent from the `packages` configuration.
  !!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'radvel.templates' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'radvel.templates' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

          If you don't want 'radvel.templates' to be distributed and are
          already explicitly excluding 'radvel.templates' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************

  !!
    check.warn(importable)
  creating build\lib.win-amd64-cpython-311\radvel\templates
  copying radvel\templates\fig_corner.tex -> build\lib.win-amd64-cpython-311\radvel\templates
  copying radvel\templates\fig_corner_derived_pars.tex -> build\lib.win-amd64-cpython-311\radvel\templates
  copying radvel\templates\fig_rv_multipanel.tex -> build\lib.win-amd64-cpython-311\radvel\templates
  copying radvel\templates\report.tex -> build\lib.win-amd64-cpython-311\radvel\templates
  copying radvel\templates\tab_comparison.tex -> build\lib.win-amd64-cpython-311\radvel\templates
  copying radvel\templates\tab_crit.tex -> build\lib.win-amd64-cpython-311\radvel\templates
  copying radvel\templates\tab_derived.tex -> build\lib.win-amd64-cpython-311\radvel\templates
  copying radvel\templates\tab_params.tex -> build\lib.win-amd64-cpython-311\radvel\templates
  copying radvel\templates\tab_prior_summary.tex -> build\lib.win-amd64-cpython-311\radvel\templates
  copying radvel\templates\tab_rv.tex -> build\lib.win-amd64-cpython-311\radvel\templates
  running build_ext
  cythoning src/_kepler.pyx to src\_kepler.c
  C:\Users\carys\anaconda3\envs\AstroProject\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\carys\AppData\Local\Temp\pip-install-9ogyz8ob\radvel_341a4b811a4449a48e798613d583e3af\src\_kepler.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  building 'radvel._kepler' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for radvel Running setup.py clean for radvel Failed to build radvel ERROR: Could not build wheels for radvel, which is required to install pyproject.toml-based projects

bjfultn commented 1 year ago

Can you try installing from pip? pip install radvel

literalcarys commented 1 year ago

Can you try installing from pip? pip install radvel

I have tried that, both in the anaconda environment and straight onto my machine. Unfortunately I get that error above

bjfultn commented 1 year ago

Which OS are you running under?

literalcarys commented 1 year ago

Which OS are you running under?

I am running Windows 10/11 on my laptop and desktop, getting the same error on both

bjfultn commented 1 year ago

Windows is not supported directly. To run it on a Windows machine you need to install WSL2 and run it under a Linux distro such as Ubuntu.

literalcarys commented 1 year ago

Windows is not supported directly. To run it on a Windows machine you need to install WSL2 and run it under a Linux distro such as Ubuntu.

Have installed WSL2 and Ubuntu and the package installed correctly. Thank you for the assistance!