PCCproject / PCC-RL

Reinforcement learning resources for PCC.
Other
152 stars 86 forks source link

ImportError: cannot import name 'PPO1' from 'stable_baselines' #20

Open jessewjx opened 1 year ago

jessewjx commented 1 year ago

Hello,

I seem to have encountered the same issue here, I am wondering how you resolved this issue? Thank you very much!

I am using python3.7, tensorflow==1.15, stable-baselines==2.10.0, gym==0.18.0 /usr/local/lib/python3.7/site-packages/sklearn/utils/validation.py:37: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. LARGE_SPARSE_SUPPORTED = LooseVersion(scipy_version) >= '0.14.0' WARNING: Logging before flag parsing goes to stderr. W0409 20:02:53.006458 4432291328 lazy_loader.py:50] The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see:

Traceback (most recent call last): File "stable_solve.py", line 21, in from stable_baselines import PPO1 ImportError: cannot import name 'PPO1' from 'stable_baselines' (/usr/local/lib/python3.7/site-packages/stable_baselines/init.py)

Best, Juexiao

Originally posted by @jessewjx in https://github.com/PCCproject/PCC-RL/issues/10#issuecomment-1501250422

valley12 commented 1 year ago

PPO1 requires [OpenMPI]. If OpenMPI isn’t enabled, then PPO1 isn’t imported into the stable_baselines module. Please refer to the document, https://stable-baselines.readthedocs.io/en/master/modules/ppo1.html