numbbo / coco

Numerical Black-Box Optimization Benchmarking Framework
https://numbbo.github.io/coco
Other
254 stars 85 forks source link

No module named 'cocoex' #2283

Closed TELO-anonym closed 1 month ago

TELO-anonym commented 1 month ago

I encountered an error while installing cocoex when I attempted step 3 in the link. How can I fix this?

python do.py run-python AML ['code-experiments/src/coco_random.c', 'code-experiments/src/coco_suite.c', 'code-experiments/src/coco_observer.c', 'code-experiments/src/coco_archive.c', 'code-experiments/src/coco_runtime_c.c'] -> code-experiments/build/python/cython/coco.c EXPAND code-experiments/build/python/cython/coco.c.in to code-experiments/build/python/cython/coco.c EXPAND code-experiments/src/coco.h to code-experiments/build/python/cython/coco.h COPY code-experiments/src/bbob2009_testcases.txt -> code-experiments/build/python/bbob2009_testcases.txt COPY code-experiments/src/bbob2009_testcases2.txt -> code-experiments/build/python/bbob2009_testcases2.txt COPY code-experiments/build/python/README.md -> code-experiments/build/python/README.txt EXPAND code-experiments/build/python/setup.py.in to code-experiments/build/python/setup.py PYTHON setup.py install in code-experiments\build\python

An exception occurred while trying to install packages.

A common reason for this error is insufficient access rights to the installation directory. The original exception message is as follows:

/----------------------------< EXCEPTION MESSAGE >----------------------------\ | | | NOTE: Using precompiled C file to build interface. | | Traceback (most recent call last): | | File "setup.py", line 48, in | | setup( | | File "D:\Users\64863\anaconda3\envs\boea\lib\site-packages\setuptools_di | | stutils\core.py", line 147, in setup | | _setup_distribution = dist = klass(attrs) | | File "D:\Users\64863\anaconda3\envs\boea\lib\site-packages\setuptools\dis | | t.py", line 314, in init | | self.metadata.version = self._normalize_version(self.metadata.version) | | File "D:\Users\64863\anaconda3\envs\boea\lib\site-packages\setuptools\dis | | t.py", line 350, in _normalize_version | | normalized = str(Version(version)) | | File "D:\Users\64863\anaconda3\envs\boea\lib\site-packages\setuptools_ve | | ndor\packaging\version.py", line 198, in init | | raise InvalidVersion(f"Invalid version: '{version}'") | | setuptools.extern.packaging.version.InvalidVersion: Invalid version: '' | -----------------------------------------------------------------------------/

To fix an access rights issue, you may try the following:

PYTHON example_experiment.py bbob in code-experiments\build\python ERROR: return value=1 Traceback (most recent call last): File "example_experiment.py", line 46, in import cocoex ModuleNotFoundError: No module named 'cocoex'

nikohansen commented 1 month ago

I have not seen this before. I am not sure at all, but a quick fix may be to downgrade setuptools to version < 66 like

pip install --upgrade setuptools==65 
nikohansen commented 1 month ago

Is this problem been solved?

TELO-anonym commented 1 month ago

Is this problem been solved?

Thank you very much. The problem has been resolved.

nikohansen commented 1 month ago

Thanks, excellent, are you comfortable sharing the resolution you found?

TELO-anonym commented 1 month ago

According to your suggestions, I have fixed this by downgrading the ``setuptools'' and the Python version.