Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when installing in R on Win 10 with "Error 1" #501

Open
Razzom opened this issue Oct 27, 2023 · 1 comment
Open

Error when installing in R on Win 10 with "Error 1" #501

Razzom opened this issue Oct 27, 2023 · 1 comment

Comments

@Razzom
Copy link

Razzom commented Oct 27, 2023

Hello everyone I currently am struggling to install the package in R on Win10
The tests to check whether the enviroments are set up seem good to me but installing the AIF360 library to them does throw an error.
AIF360 seems to ask for Python 3.11 while the enviroment set up is with Python 3.9?

The Code used overall I took from another issue in here.

reticulate::conda_list()
reticulate::conda_create(envname = "r-test")
reticulate::use_miniconda(condaenv = "r-test", required = TRUE)
reticulate::py_config()
devtools::install_github("Trusted-AI/AIF360/aif360/aif360-r")
aif360::install_aif360(envname = "r-test")

The Test:s

 reticulate::conda_list()
          name                                                                       python
1         base                     C:\\Users\\Benny\\AppData\\Local\\r-miniconda/python.exe
2 r-reticulate C:\\Users\\Benny\\AppData\\Local\\r-miniconda\\envs\\r-reticulate/python.exe
3       r-test       C:\\Users\\Benny\\AppData\\Local\\r-miniconda\\envs\\r-test/python.exe
> reticulate::py_config()
python:         C:/Users/Benny/AppData/Local/r-miniconda/envs/r-reticulate/python.exe
libpython:      C:/Users/Benny/AppData/Local/r-miniconda/envs/r-reticulate/python39.dll
pythonhome:     C:/Users/Benny/AppData/Local/r-miniconda/envs/r-reticulate
version:        3.9.18 | packaged by conda-forge | (main, Aug 30 2023, 03:40:31) [MSC v.1929 64 bit (AMD64)]
Architecture:   64bit
numpy:          C:/Users/Benny/AppData/Local/r-miniconda/envs/r-reticulate/Lib/site-packages/numpy
numpy_version:  1.26.0
 aif360::install_aif360(envname = "r-test")
+ "C:/Users/Benny/AppData/Local/r-miniconda/condabin/conda.bat" "install" "--yes" "--name" "r-test" "python=3.11"
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

# All requested packages already installed.


C:\Users\Benny\OneDrive\Uni\Bachelorarbeit\Bachelorarbeit>CALL "C:\Users\Benny\AppData\Local\r-miniconda\condabin\activate.bat" "r-test" 

C:\Users\Benny\OneDrive\Uni\Bachelorarbeit\Bachelorarbeit>conda.bat activate "r-test" 
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\__main__.py", line 22, in <module>
    from pip._internal.cli.main import main as _main
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_internal\cli\main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_internal\cli\autocompletion.py", line 10, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_internal\cli\main_parser.py", line 9, in <module>
    from pip._internal.build_env import get_runnable_pip
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_internal\build_env.py", line 19, in <module>
    from pip._internal.cli.spinners import open_spinner
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_internal\cli\spinners.py", line 9, in <module>
    from pip._internal.utils.logging import get_indentation
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_internal\utils\logging.py", line 29, in <module>
    from pip._internal.utils.misc import ensure_dir
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_internal\utils\misc.py", line 44, in <module>
    from pip._internal.locations import get_major_minor_version
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_internal\locations\__init__.py", line 14, in <module>
    from . import _sysconfig
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_internal\locations\_sysconfig.py", line 11, in <module>
    from .base import change_root, get_major_minor_version, is_osx_framework
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_internal\locations\base.py", line 9, in <module>
    from pip._internal.utils import appdirs
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_internal\utils\appdirs.py", line 13, in <module>
    from pip._vendor import platformdirs as _appdirs
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_vendor\platformdirs\__init__.py", line 46, in <module>
    PlatformDirs = _set_platform_dir_class()  #: Currently active platform
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_vendor\platformdirs\__init__.py", line 26, in _set_platform_dir_class
    from pip._vendor.platformdirs.windows import Windows as Result
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\site-packages\pip\_vendor\platformdirs\windows.py", line 4, in <module>
    import ctypes
  File "C:\Users\Benny\AppData\Local\r-miniconda\envs\r-test\Lib\ctypes\__init__.py", line 8, in <module>
    from _ctypes import Union, Structure, Array
ImportError: DLL load failed while importing _ctypes: The specified module could not be found.
Error: Error installing package(s): "aif360", "numba", "BlackBoxAuditing", "\"tensorflow>=1.13.1,<2\"", "pandas", "\"fairlearn==0.4.6\"", "\"protobuf==3.20.1\""
In addition: Warning message:
In shell(fi, intern = intern) :
  'C:\Users\Benny\AppData\Local\Temp\RtmpkpLBdF\file3bf8e334f5d.bat' execution failed with error code 1
@Razzom
Copy link
Author

Razzom commented Oct 27, 2023

I've got it to work apparently by changing the line to

aif360::install_aif360(envname = "r-test", conda_python_version = "3.7")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant