iffiX / machin

Reinforcement learning library(framework) designed for PyTorch, implements DQN, DDPG, A2C, PPO, SAC, MADDPG, A3C, APEX, IMPALA ...
MIT License
400 stars 51 forks source link

ImportError: cannot import name 'FileStore' #21

Closed pengxiang-pang closed 3 years ago

pengxiang-pang commented 3 years ago

File "D:\Anaconda3\envs\universe\lib\site-packages\torch\distributed\rendezvous.py", line 9, in from . import FileStore, TCPStore ImportError: cannot import name 'FileStore'

After installing machin, run PPO. py,than report an error, and try others to report the same error.As follow:

D:\Anaconda3\envs\universe\python.exe F:/machin/machin-master/examples/framework_examples/dqn.py Traceback (most recent call last): File "F:/machin/machin-master/examples/framework_examples/dqn.py", line 1, in from machin.frame.algorithms import DQN File "D:\Anaconda3\envs\universe\lib\site-packages\machin__init.py", line 1, in from . import env, frame, model, parallel, utils File "D:\Anaconda3\envs\universe\lib\site-packages\machin\env\init.py", line 1, in from . import utils, wrappers File "D:\Anaconda3\envs\universe\lib\site-packages\machin\env\wrappers\init.py", line 1, in from . import base, openai_gym File "D:\Anaconda3\envs\universe\lib\site-packages\machin\env\wrappers\openai_gym.py", line 8, in from machin.parallel.exception import ExceptionWithTraceback File "D:\Anaconda3\envs\universe\lib\site-packages\machin\parallel\init.py", line 2, in from . import distributed, server, assigner, exception, pickle, thread, pool, queue File "D:\Anaconda3\envs\universe\lib\site-packages\machin\parallel\distributed\init__.py", line 1, in from .world import ( File "D:\Anaconda3\envs\universe\lib\site-packages\machin\parallel\distributed\world.py", line 14, in import torch.distributed.distributed_c10d as dist_c10d File "D:\Anaconda3\envs\universe\lib\site-packages\torch\distributed\distributed_c10d.py", line 10, in from .rendezvous import rendezvous, register_rendezvous_handler # noqa: F401 File "D:\Anaconda3\envs\universe\lib\site-packages\torch\distributed\rendezvous.py", line 9, in from . import FileStore, TCPStore ImportError: cannot import name 'FileStore'

Process finished with exit code 1

iffiX commented 3 years ago

Hi, this problem is fixed in 193af0f96f3790b24e91870f6f47f0f73549243e, however the pypi package is not updated yet, could you please install from github using:

pip install git+https://github.com/iffiX/machin

As there is no problem with my windows installation.

pengxiang-pang commented 3 years ago

Thank you for your answer. As you said, I tried the pip install git+https://github.com/iffiX/machin.Unfortunately, the following error occurred. (universe) C:\Users\px>pip install git+https://github.com/iffiX/machin Collecting git+https://github.com/iffiX/machin Cloning https://github.com/iffiX/machin to c:\users\public\documents\wondershare\creatortemp\pip-8qqy0n7z-build Error [WinError 2] 系统找不到指定的文件。 while executing command git clone -q https://github.com/iffiX/machin C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-8qqy0n7z-build Cannot find command 'git' I'd appreciate it if you could give me some advice.

pengxiang-pang commented 3 years ago

I just uninstalled machin and then tried this command-- ((universe) F: machin\machin-master>python setup.py install) .Luckily, it works.

iffiX commented 3 years ago

Yeah, glad to hear that you have no problem. The Windows installation process is more clumsy than Linux.

pengxiang-pang commented 3 years ago

Thank you very much for your help.