I'm using AWS for work with Anaconda in it. I don't have permission to install any python library (I mean, I requested it and it's taking ages) so I'm trying to see if there's a way around it.
I'm trying to install xgboost, what I did was to download all .py files in the github repo (only the .py files) for the library, put them in a folder that looks like this:
xgboost package
    |
    + - setup.py
      - xgboost
        |
        + - __init__.py
          - callback.py
          - core.py
             .
             .
             .
I already did this based on this answer
import importlib.util
spec = importlib.util.spec_from_file_location("xgboost", "/path/to/setup/file.py")
foo = importlib.util.module_from_spec(spec)
spec.loader.exec_module(foo)
foo.MyClass()
wouldn't this be enough to use it?
When I run test = xgboost.XGBRegressor() or test = foo.XGBRegressor() it gives me this error
AttributeError: 'xgboost' has no attribute 'XGBRegressor'.
If I try from xgboost import XGBRegressor it gives me
Traceback (most recent call last):
 
  File "<ipython-input-3634-477fa34615c5>", line 1, in <module>
    from xgboost import XGBClassifier
 
  File "D:\Users\Catalina\Documents\xgboost package\xgboost\__init__.py", line 16, in <module>
    from .core import DMatrix, DeviceQuantileDMatrix, Booster
 
  File "D:\Users\Catalina\Documents\xgboost package\xgboost\core.py", line 176, in <module>
    _LIB = _load_lib()
 
  File "D:\Users\Catalina\Documents\xgboost package\xgboost\core.py", line 135, in _load_lib
    lib_paths = find_lib_path()
 
  File "D:\Users\Catalina\Documents\xgboost package\xgboost\libpath.py", line 66, in find_lib_path
    raise XGBoostLibraryNotFound(msg)
 
XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path.  List of candidates:
- D:\Users\Catalina\Documents\xgboost package\xgboost\lib\xgboost.dll
- D:\Users\Catalina\Documents\xgboost package\xgboost\..\..\lib\xgboost.dll
- D:\Users\Catalina\Documents\xgboost package\xgboost\../../windows/x64/Release/xgboost.dll
- D:\Users\Catalina\Documents\xgboost package\xgboost\./windows/x64/Release/xgboost.dll
XGBoost Python package path: D:\Users\Catalina\Documents\xgboost package\xgboost
sys.prefix: C:\ProgramData\Anaconda3
See: https://xgboost.readthedocs.io/en/latest/build.html for installing XGBoost.
I have no clue what's going on at this point. Any help is welcome
