Open Skylark0924 opened 2 years ago
Maybe you can find the installation path of your package automatically by these following codes
if elegantrl_path == "":
if not hasattr(elegantrl, "__path__"):
raise RuntimeError("elegantrl package is not installed")
elegantrl_path = list(elegantrl.__path__)[0]
config_path = os.path.join(elegantrl_path, "cfg")
your plugins is not in this path.check it it may be for os.
@kami-ayati I don't know what you're talking about
Bugs
When I tested the Isaac tutorial with elegantRL (use this code the author mentioned in this issue). I found that neither the config files nor the asset files can be loaded without modifying the source code of ElegantRL. The error is shown as follows
config files error
asset files error
Analysis
Since your package on PYPI has not been updated for a while, I installed the
elegantRL
via source codes. However, I found that the assets folder has not been installed viapip3 install .
. This might be because only.py
files will be packaged viasetup.py
. Besides, theos.getcwd
cannot return the path of the package, but return the path of the user's project.The asset_root path shares the same issue.
Suggestion
To contain the non-py files while installing, you need to write a
MANIFEST.in
file to point out the path of data. Here is an example of my package. And then modify thesetup.py
as