我成功安装了rllab:
$ source activate rllab3
(rllab3) $ Python 3.5.2 :: Continuum Analytics, Inc.
(rllab3) $ import rllab
(rllab3) $
但是当我尝试导入其他库时:
(rllab3) $ from rllab.algos.trpo import TRPO
from: can't read /var/mail/rllab.algos.trpo
(rllab3) $ from rllab import rllab
from: can't read /var/mail/rllab
我能理解为什么会这样。 我定义了环境变量
export PYTHONPATH="${PYTHONPATH}:/home/b**/rllab3"
当我尝试从spyder加载它时:
[] import rllab
Traceback (most recent call last):
File "<ipython-input-1-6bfd29d10263>", line 1, in <module>
import rllab
ModuleNotFoundError: No module named 'rllab'
我无法解决问题。如果问题是环境变量,有人可以帮我解决吗? 我找不到我的系统上安装了rllab的地方(我用anaconda安装了它)
答案 0 :(得分:0)
我知道这个帖子很老了,但我最近开始研究rllab,这是我的理解。 rllab3是类似于虚拟环境的conda环境,如rllab documentation中所述。它没有安装实际的模块,你需要单独安装它。
(rllab3) $ python3
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:52:12)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import rllab
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'rllab'
要使用该软件包,您需要下载实际的软件包,并指向该软件包的python路径。
(rllab3) $ pwd
/Users/r**/***/repo/rllab
(rllab3) $ python3
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:52:12)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from rllab.algos.trpo import TRPO
>>>