質問編集履歴

2

エラー文をすべてテキストにした

2022/07/02 02:50

投稿

tanakan
tanakan

スコア1

test CHANGED
File without changes
test CHANGED
@@ -19,8 +19,78 @@
19
19
  pip isntall --upgrade --user pyqt5==5.12
20
20
  pip isntall imageio
21
21
 
22
- 現在、強化学習の勉強をしておりAtariにある「breakout」の学習を行っているのですが、その際に以下の写真のようなエラーが出てしまいます。
22
+ 現在、強化学習の勉強をしておりAtariにある「breakout」の学習を行っているのですが、その際に以下ようなエラーが出てしまいます。なお、書籍のホームページからダウンロードできた「breakout.py」というソースコードを実行しました。
23
- ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-07-01/b80399f2-f232-4d12-91f2-d82cec4694c1.png)
24
23
 
25
- 自分で調べたところ、何やら「dllファイル」というもが不足しているらしいということが分かったですが、どのdllファイルが不足しているのか、また不足しているdllファイルの探し方が分かりません。ですので、不足しているdllファイルの探し方について教えていただきたいです。
24
+ (openai_gym) C:\Users\kouse\OneDrive\デスクトップ\sample\5_Atari環境攻略\1_Atari環境学習>python breakout.py
25
+ C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
26
+ _np_qint8 = np.dtype([("qint8", np.int8, 1)])
27
+ C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
28
+ _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
29
+ C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
30
+ _np_qint16 = np.dtype([("qint16", np.int16, 1)])
31
+ C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
32
+ _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
33
+ C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
34
+ _np_qint32 = np.dtype([("qint32", np.int32, 1)])
35
+ C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
36
+ np_resource = np.dtype([("resource", np.ubyte, 1)])
37
+ C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
38
+ _np_qint8 = np.dtype([("qint8", np.int8, 1)])
39
+ C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
40
+ _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
41
+ C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
42
+ _np_qint16 = np.dtype([("qint16", np.int16, 1)])
43
+ C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
44
+ _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
45
+ C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
46
+ _np_qint32 = np.dtype([("qint32", np.int32, 1)])
47
+ C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
48
+ np_resource = np.dtype([("resource", np.ubyte, 1)])
49
+ C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\stable_baselines\__init__.py:33: UserWarning: stable-baselines is in maintenance mode, please use [Stable-Baselines3 (SB3)](https://github.com/DLR-RM/stable-baselines3) for an up-to-date version. You can find a [migration guide](https://stable-baselines3.readthedocs.io/en/master/guide/migration.html) in SB3 documentation.
50
+ "stable-baselines is in maintenance mode, please use [Stable-Baselines3 (SB3)](https://github.com/DLR-RM/stable-baselines3) for an up-to-date version. You can find a [migration guide](https://stable-baselines3.readthedocs.io/en/master/guide/migration.html) in SB3 documentation."
51
+ WARNING:tensorflow:From C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\stable_baselines\common\misc_util.py:26: The name tf.set_random_seed is deprecated. Please use tf.compat.v1.set_random_seed instead.
52
+
53
+ Traceback (most recent call last):
54
+ File "breakout.py", line 64, in <module>
55
+ main()
56
+ File "breakout.py", line 27, in main
57
+ train_env = DummyVecEnv([make_env(ENV_ID, i) for i in range(NUM_ENV)])
58
+ File "C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\stable_baselines\common\vec_env\dummy_vec_env.py", line 23, in __init__
59
+ self.envs = [fn() for fn in env_fns]
60
+ File "C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\stable_baselines\common\vec_env\dummy_vec_env.py", line 23, in <listcomp>
61
+ self.envs = [fn() for fn in env_fns]
62
+ File "breakout.py", line 16, in _init
63
+ env = gym.make(env_id)
64
+ File "C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\gym\envs\registration.py", line 184, in make
65
+ return registry.make(id, **kwargs)
66
+ File "C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\gym\envs\registration.py", line 106, in make
67
+ env = spec.make(**kwargs)
68
+ File "C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\gym\envs\registration.py", line 75, in make
69
+ cls = load(self.entry_point)
70
+ File "C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\gym\envs\registration.py", line 18, in load
71
+ mod = importlib.import_module(mod_name)
72
+ File "C:\Users\kouse\anaconda3\envs\openai_gym\lib\importlib\__init__.py", line 127, in import_module
73
+ return _bootstrap._gcd_import(name[level:], package, level)
74
+ File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
75
+ File "<frozen importlib._bootstrap>", line 983, in _find_and_load
76
+ File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
77
+ File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
78
+ File "<frozen importlib._bootstrap_external>", line 728, in exec_module
79
+ File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
80
+ File "C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\gym\envs\atari\__init__.py", line 1, in <module>
81
+ from gym.envs.atari.atari_env import AtariEnv
82
+ File "C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\gym\envs\atari\atari_env.py", line 9, in <module>
83
+ import atari_py
84
+ File "C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\atari_py\__init__.py", line 1, in <module>
85
+ from .ale_python_interface import *
86
+ File "C:\Users\kouse\anaconda3\envs\openai_gym\lib\site-packages\atari_py\ale_python_interface.py", line 18, in <module>
87
+ 'ale_interface/ale_c.dll'))
88
+ File "C:\Users\kouse\anaconda3\envs\openai_gym\lib\ctypes\__init__.py", line 442, in LoadLibrary
89
+ return self._dlltype(name)
90
+ File "C:\Users\kouse\anaconda3\envs\openai_gym\lib\ctypes\__init__.py", line 364, in __init__
91
+ self._handle = _dlopen(self._name, mode)
92
+ OSError: [WinError 126] 指定されたモジュールが見つかりません。
93
+
94
+ 自分で調べたところ、何やら「dllファイル」というものが不足しているらしいということが分かったのですが、どのdllファイルが不足しているのか、また不足しているdllファイルの探し方が分かりません。ですので、不足しているdllファイルの探し方について教えていただきたいです。なお、stable-baselines自体は正常に動作していました。atariを実行しようとするとエラーが出てしまうといった状況です。
95
+
26
96
  よろしくお願いします。

1

環境構築について詳しくしました。

2022/07/02 02:45

投稿

tanakan
tanakan

スコア1

test CHANGED
File without changes
test CHANGED
@@ -4,6 +4,21 @@
4
4
  stable-baselines[mpi]
5
5
  windows10
6
6
 
7
+ **環境構築**
8
+ 参考にした書籍:https://www.borndigital.co.jp/book/17130.html
9
+
10
+ ①仮想環境の構築
11
+ conda create -n openai_gym python=3.7 anaconda
12
+ conda active openai_gym
13
+ pip install tensorflow==1.14.0
14
+
15
+
16
+ ②stable-baselinesのインストール
17
+ pip install stable-baselines[mpi]
18
+ pip install --upgrade --user pyqtwebengine==5.12
19
+ pip isntall --upgrade --user pyqt5==5.12
20
+ pip isntall imageio
21
+
7
22
  現在、強化学習の勉強をしておりAtariにある「breakout」の学習を行っているのですが、その際に以下の写真のようなエラーが出てしまいます。
8
23
  ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-07-01/b80399f2-f232-4d12-91f2-d82cec4694c1.png)
9
24