-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Editable install fails with ImportError: cannot import name 'INSTINCT_RL_ROOT'
At the same time, it would cause some import bug when use some scripts:
(instinct-mj) myh@myh-Legion-Y7000P-IRX9:~/myh/disk-2TB/01_PAPER/InstinctMJ$ python
Python 3.13.5 (main, Jul 11 2025, 22:43:46) [Clang 20.1.4 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
import instinct_rl
from instinct_rl import INSTINCT_RL_ROOT
Traceback (most recent call last):
File "", line 1, in
from instinct_rl import INSTINCT_RL_ROOT
ImportError: cannot import name 'INSTINCT_RL_ROOT' from 'instinct_rl' (unknown location)
and it could be solved by modifying setup.py, just add a line:
package_dir={"": "."},
total setup.py:
`from setuptools import find_packages, setup
setup(
name="instinct_rl",
version="1.0.2",
author="Ziwen Zhuang",
author_email="",
license="BSD-3-Clause",
packages=find_packages(),
package_dir={"": "."},
description="Fast and simple RL algorithms implemented in pytorch",
python_requires=">=3.6",
install_requires=[
"torch>=2.4.0",
"torchvision>=0.5.0",
"numpy>=1.16.4",
"tensorboardX",
"tensorboard",
"tabulate",
"GitPython",
"onnx",
"onnxscript",
],
)
`
