modl icon indicating copy to clipboard operation
modl copied to clipboard

ValueError: 'modl/datasets/tests' is not a directory

Open swaythe opened this issue 6 years ago • 8 comments

Hi, I am trying to install modl and get the above error. I checked under modl/datasets and there is no directory called tests. Could you please help me get past this and install modl?

Thanks, Swetha.

swaythe avatar Nov 12 '19 15:11 swaythe

Hello,

I encountered the same error above. I work on Ubuntu 18.04, Anaconda 3.

Error is here (pip install .):

Processing /home/hao/Project/modl ERROR: Complete output from command python setup.py egg_info: ERROR: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-req-build-bzysqwp5/setup.py", line 80, in setup_package() File "/tmp/pip-req-build-bzysqwp5/setup.py", line 74, in setup_package 'Programming Language :: Python :: 3.5' File "/home/hao/Software/Anaconda3/lib/python3.7/site-packages/numpy/distutils/core.py", line 137, in setup config = configuration() File "/tmp/pip-req-build-bzysqwp5/setup.py", line 34, in configuration config.add_subpackage('modl') File "/home/hao/Software/Anaconda3/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1036, in add_subpackage caller_level = 2) File "/home/hao/Software/Anaconda3/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1005, in get_subpackage caller_level = caller_level + 1) File "/home/hao/Software/Anaconda3/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 942, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "modl/setup.py", line 7, in configuration config.add_subpackage('datasets') File "/home/hao/Software/Anaconda3/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1036, in add_subpackage caller_level = 2) File "/home/hao/Software/Anaconda3/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1005, in get_subpackage caller_level = caller_level + 1) File "/home/hao/Software/Anaconda3/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 942, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "modl/datasets/setup.py", line 6, in configuration config.add_subpackage('tests') File "/home/hao/Software/Anaconda3/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 1036, in add_subpackage caller_level = 2) File "/home/hao/Software/Anaconda3/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 998, in get_subpackage caller_level = caller_level+1) File "/home/hao/Software/Anaconda3/lib/python3.7/site-packages/numpy/distutils/misc_util.py", line 780, in init raise ValueError("%r is not a directory" % (package_path,)) ValueError: 'modl/datasets/tests' is not a directory ---------------------------------------- ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-bzysqwp5/

Could you please help us ?

Thanks in advance

Hao

anbai106 avatar Feb 14 '20 20:02 anbai106

Hi Hao,

I have a hack solution: In modl/modl/datasets, edit setup.py to comment out line #6 config.add_subpackage('tests')

In ~/modl/modl/input_data/fmri/fixes.py: Comment lines 19, 20 and 225 Comment class NibabelHasher starting on line 61 Comment function our_hash starting on line 88 Comment function our_get_argument_hash starting on line 106

These functions and classes don't seem to be referenced elsewhere.

Swetha.

swaythe avatar Feb 18 '20 17:02 swaythe

@swaythe The installation works! Thank you so much for your help! One more question, were you able to run the example scripts? Like:

python examples/decompose_fmri.py I got the errors:

from .random_fast import RandomState ModuleNotFoundError: No module named 'modl.utils.randomkit.random_fast'

I don't think the current package are actively maintained...

Hao

anbai106 avatar May 07 '20 19:05 anbai106

@anbai106 I was able to run decompose_fmri after making the fixes above - not sure why you're getting that error. Did you check the path (modl/modl/utils/randomkit) to see if random_fast is present? I see a random_fast.pyx file in my folder.

Yeah, I don't think modl is actively maintained.

swaythe avatar May 12 '20 14:05 swaythe

@swaythe I do have that pyx file, but the script can not find that module path. Strangely, if I import that path independently in terminal, it can be found, which located my Conda virtual environment... I don't know where the problem is, maybe I missed some steps for installation?

anbai106 avatar May 12 '20 14:05 anbai106

@anbai106 That's weird. Did you have the same conda environment active during both installation of modl and running the example script? I can't think of a better reason.

swaythe avatar May 12 '20 14:05 swaythe

@swaythe I reinstall everything with anaconda env, followed your instruction and install everything in that virtual env. The error came back.... I think I'm going to quit. It's a pity that this repo is not maintained by the authors... Thank you for your generous help!

anbai106 avatar May 12 '20 17:05 anbai106

@anbai106 Sorry to hear that! Let me know if something changes.

swaythe avatar May 12 '20 22:05 swaythe