I am trying to impute the NaNs in an all-count-variables dataset using the miceforest package, but I cannot get the import miceforest as mf line to run.
The (huge) error I get after running the import line:
Unexpected exception formatting exception. Falling back to standard exception
Traceback (most recent call last):
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\IPython\core\interactiveshell.py", line 3505, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "C:\Users\name\AppData\Local\Temp\ipykernel_9284\3119014582.py", line 4, in <module>
import miceforest as mf
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\miceforest\__init__.py", line 14, in <module>
from .ImputationKernel import ImputationKernel
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\miceforest\ImputationKernel.py", line 25, in <module>
from lightgbm import train, Dataset, cv, log_evaluation, early_stopping, Booster
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\lightgbm\__init__.py", line 8, in <module>
from .basic import Booster, Dataset, Sequence, register_logger
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\lightgbm\basic.py", line 20, in <module>
from .compat import PANDAS_INSTALLED, concat, dt_DataTable, is_dtype_sparse, pd_DataFrame, pd_Series
ImportError: cannot import name 'is_dtype_sparse' from 'lightgbm.compat' (C:\Users\name\miniconda3\envs\my-env\lib\site-packages\lightgbm\compat.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\IPython\core\interactiveshell.py", line 2102, in showtraceback
stb = self.InteractiveTB.structured_traceback(
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\IPython\core\ultratb.py", line 1310, in structured_traceback
return FormattedTB.structured_traceback(
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\IPython\core\ultratb.py", line 1199, in structured_traceback
return VerboseTB.structured_traceback(
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\IPython\core\ultratb.py", line 1052, in structured_traceback
formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\IPython\core\ultratb.py", line 978, in format_exception_as_a_whole
frames.append(self.format_record(record))
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\IPython\core\ultratb.py", line 878, in format_record
frame_info.lines, Colors, self.has_colors, lvals
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\IPython\core\ultratb.py", line 712, in lines
return self._sd.lines
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\stack_data\utils.py", line 145, in cached_property_wrapper
value = obj.__dict__[self.func.__name__] = self.func(obj)
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\stack_data\core.py", line 698, in lines
pieces = self.included_pieces
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\stack_data\utils.py", line 145, in cached_property_wrapper
value = obj.__dict__[self.func.__name__] = self.func(obj)
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\stack_data\core.py", line 649, in included_pieces
pos = scope_pieces.index(self.executing_piece)
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\stack_data\utils.py", line 145, in cached_property_wrapper
value = obj.__dict__[self.func.__name__] = self.func(obj)
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\stack_data\core.py", line 628, in executing_piece
return only(
File "C:\Users\name\miniconda3\envs\my-env\lib\site-packages\executing\executing.py", line 164, in only
raise NotOneValueFound('Expected one value, found 0')
executing.executing.NotOneValueFound: Expected one value, found 0
miceforest runs on lightgbm, so the first thing I did was try to install it through conda install -c conda-forge lightgbm to no avail. It frozes after the following lines:
(my-env) C:\Users\name\miniconda3\envs>conda install -c conda-forge lightgbm
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Is the never-ending installation of lightgbm the issue?
Does it take hours to install and should I just let it run?