randy3k / radian

A 21 century R console
MIT License
1.96k stars 73 forks source link

Can't install rchitect on Windows 11 #387

Closed vidonne closed 1 year ago

vidonne commented 1 year ago

When trying to install radian following the recommended installation call with pip: pip3 install -U radian it creates an error with the rchitect dependency. The error messages as follow:

Collecting radian
  Using cached radian-0.6.4-py3-none-any.whl
Collecting rchitect<0.4.0,>=0.3.39
  Using cached rchitect-0.3.39.tar.gz (32 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: prompt-toolkit<3.1,>=3.0.15 in c:\users\[username]\appdata\local\programs\python\python311\lib\site-packages (from radian) (3.0.33)
Requirement already satisfied: pygments>=2.5.0 in c:\users\[username]\appdata\local\programs\python\python311\lib\site-packages (from radian) (2.13.0)        
Requirement already satisfied: wcwidth in c:\users\[username]\appdata\local\programs\python\python311\lib\site-packages (from prompt-toolkit<3.1,>=3.0.15->radian) (0.2.5)
Requirement already satisfied: cffi>=1.10.0 in c:\users\[username]\appdata\local\programs\python\python311\lib\site-packages (from rchitect<0.4.0,>=0.3.39->radian) (1.15.1)
Requirement already satisfied: six>=1.9.0 in c:\users\[username]\appdata\local\programs\python\python311\lib\site-packages (from rchitect<0.4.0,>=0.3.39->radian) (1.16.0)
Requirement already satisfied: pycparser in c:\users\[username]\appdata\local\programs\python\python311\lib\site-packages (from cffi>=1.10.0->rchitect<0.4.0,>=0.3.39->radian) (2.21)
Installing collected packages: rchitect, radian
  DEPRECATION: rchitect is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for rchitect ... error
  error: subprocess-exited-with-error

  × Running setup.py install for rchitect did not run successfully.
  │ exit code: 1
  ╰─> [44 lines of output]
      C:\Users\[username]\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      WARNING: The wheel package is not available.
      running install
      C:\Users\[username]\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\rchitect
      copying rchitect\callbacks.py -> build\lib.win-amd64-cpython-311\rchitect
      copying rchitect\completion.py -> build\lib.win-amd64-cpython-311\rchitect
      copying rchitect\console.py -> build\lib.win-amd64-cpython-311\rchitect
      copying rchitect\dispatch.py -> build\lib.win-amd64-cpython-311\rchitect
      copying rchitect\interface.py -> build\lib.win-amd64-cpython-311\rchitect
      copying rchitect\py_tools.py -> build\lib.win-amd64-cpython-311\rchitect
      copying rchitect\repl.py -> build\lib.win-amd64-cpython-311\rchitect
      copying rchitect\setup.py -> build\lib.win-amd64-cpython-311\rchitect
      copying rchitect\types.py -> build\lib.win-amd64-cpython-311\rchitect
      copying rchitect\utils.py -> build\lib.win-amd64-cpython-311\rchitect
      copying rchitect\xptr.py -> build\lib.win-amd64-cpython-311\rchitect
      copying rchitect\__init__.py -> build\lib.win-amd64-cpython-311\rchitect
      creating build\lib.win-amd64-cpython-311\rchitect\reticulate
      copying rchitect\reticulate\path.py -> build\lib.win-amd64-cpython-311\rchitect\reticulate
      copying rchitect\reticulate\py_config.py -> build\lib.win-amd64-cpython-311\rchitect\reticulate
      copying rchitect\reticulate\__init__.py -> build\lib.win-amd64-cpython-311\rchitect\reticulate
      copying rchitect\reticulate\config.R -> build\lib.win-amd64-cpython-311\rchitect\reticulate
      creating build\lib.win-amd64-cpython-311\rchitect\src
      copying rchitect\src\gil.c -> build\lib.win-amd64-cpython-311\rchitect\src
      copying rchitect\src\gil.h -> build\lib.win-amd64-cpython-311\rchitect\src
      copying rchitect\src\libR.c -> build\lib.win-amd64-cpython-311\rchitect\src
      copying rchitect\src\libR.h -> build\lib.win-amd64-cpython-311\rchitect\src
      copying rchitect\src\parse.c -> build\lib.win-amd64-cpython-311\rchitect\src
      copying rchitect\src\parse.h -> build\lib.win-amd64-cpython-311\rchitect\src
      copying rchitect\src\process_events.c -> build\lib.win-amd64-cpython-311\rchitect\src
      copying rchitect\src\process_events.h -> build\lib.win-amd64-cpython-311\rchitect\src
      copying rchitect\src\R.h -> build\lib.win-amd64-cpython-311\rchitect\src
      running build_ext
      generating cffi module 'build\\temp.win-amd64-cpython-311\\Release\\rchitect._cffi.c'
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      building 'rchitect._cffi' 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: legacy-install-failure

× Encountered error while trying to install package.
╰─> rchitect

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

I tried to follow the recommendations from the error log but no luck Any ideas how to fix it? Thanks for your great work on this

HiraShaukat29 commented 1 year ago

I wasted my whole day over that too trying all the options but nothing worked, and finally I tried it through conda conda install -c conda-forge radian and there was no problem

vidonne commented 1 year ago

Thanks tried with conda and worked as well.