1、python behavioral_cloning.py
(base) [ec2-user@ip- workspace]$ cd baselines/general/chainerrl/baselines/agents
(base) [ec2-user@ip- agents]$ python behavioral_cloning.py
Traceback (most recent call last):
File "behavioral_cloning.py", line 9, in <module>
import minerl # noqa: register MineRL envs as Gym envs.
ModuleNotFoundError: No module named 'minerl'
- python gail.py
(base) [ec2-user@ip- agents]$ python gail.py
Traceback (most recent call last):
File "gail.py", line 16, in <module>
import chainer
ModuleNotFoundError: No module named 'chainer'
-
cd ~ 而非cd …
因为不要在子baselines下安装,这会把baselines的文件体系弄乱,要在根目录下下载存储安装 -
git clone git@github.com:openai/gym.git
-
cd gym
6.python setup.py install
前面没有加sudo,所以有bug
python setup.py install
running install
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/home/ec2-user/anaconda/lib/python3.7/site-packages/test-easy-install-2981.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/home/ec2-user/anaconda/lib/python3.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://setuptools.readthedocs.io/en/latest/easy_install.html
Please make the appropriate changes for your system and try again.
- 加sudo,安装成功。
sudo python setup.py install
running install
………………
Using /usr/lib/python2.7/dist-packages
Finished processing dependencies for gym==0.17.2
-
记住这里不是要加pip3,而是要加sudo
-
再安装minerl
(base) [ec2-user@ip- ~]$ git clone git@github.com:minerllabs/minerl.git
Cloning into 'minerl'...
remote: Enumerating objects: 370, done.
remote: Counting objects: 100% (370/370), done.
remote: Compressing objects: 100% (273/273), done.
remote: Total 4281 (delta 177), reused 247 (delta 85), pack-reused 3911
Receiving objects: 100% (4281/4281), 71.81 MiB | 32.15 MiB/s, done.
Resolving deltas: 100% (2397/2397), done.
(base) [ec2-user@ip- ~]$ cd minerl
(base) [ec2-user@ip-minerl]$ sudo python setup.py install
Traceback (most recent call last):
File "setup.py", line 5, in <module>
import pathlib
ImportError: No module named pathlib
- 安装pathlib
(base) [ec2-user@ip- minerl]$ cd ~
(base) [ec2-user@ip- ~]$ git clone git@github.com:mcmtroffaes/pathlib2.git
Cloning into ‘pathlib2’…
remote: Enumerating objects: 1473, done.
remote: Total 1473 (delta 0), reused 0 (delta 0), pack-reused 1473
Receiving objects: 100% (1473/1473), 2.30 MiB | 16.55 MiB/s, done.
Resolving deltas: 100% (884/884), done.
(base) [ec2-user@ip- ~]$ cd pathlib2
(base) [ec2-user@ip- pathlib2]$ sudo python setup.py install
running install
running bdist_egg
……………………
Using /usr/lib/python2.7/dist-packages
Finished processing dependencies for pathlib2==2.3.6a0
- 再装minerl
不成功 - 装pathlib库始终不成功
pip install pathlib
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
Collecting pathlib
Using cached pathlib-1.0.1.tar.gz (49 kB)
Building wheels for collected packages: pathlib
Building wheel for pathlib (setup.py) ... done
Created wheel for pathlib: filename=pathlib-1.0.1-py3-none-any.whl size=14347 sha256=cbbf6266d9be91108f34ff632b07c4ece227c2d3db9f37916b6a59567fd91be3
Stored in directory: /home/ec2-user/.cache/pip/wheels/6e/96/b8/10037fe231e23970bac58361d7c93571ab983a7bbc55e68550
Successfully built pathlib
Installing collected packages: pathlib
Successfully installed pathlib-1.0.1
(base) [ec2-user@ip-~]$ cd minerl
(base) [ec2-user@ip- minerl]$ sudo python setup.py install
Traceback (most recent call last):
File "setup.py", line 5, in <module>
import pathlib
ImportError: No module named pathlib
- 废了九牛二虎之力,终于把pathlib2删除了
(base) [ec2-user@ip- ~]$ cd /usr/local/lib/python2.7/site-packages
(base) [ec2-u