0

I installed rllab successfully:

$ source activate rllab3
(rllab3) $ Python 3.5.2 :: Continuum Analytics, Inc.
(rllab3)  $ import rllab
(rllab3)  $ 

but when I try to import other libraries:

(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

I can understand why this happens. I defined the environment variable

export PYTHONPATH="${PYTHONPATH}:/home/b**/rllab3"

when I am trying to load it from spyder:

[] import rllab
Traceback (most recent call last):
File "<ipython-input-1-6bfd29d10263>", line 1, in <module>
import rllab
ModuleNotFoundError: No module named 'rllab'

I can't figure the problem. If the problem is with environment variable, can anyone help me to fix it? I can not find where were rllab is installed on my system (I installed it with anaconda)

DeepML
  • 23
  • 6
  • can you check `python --version` ? you have installed `rllab3` for `python 3.5.2` – Mahesh Karia Nov 05 '17 at 16:03
  • can you paste exact version ? – Mahesh Karia Nov 05 '17 at 16:36
  • rllab3 on Python 3.6.2 |Anaconda custom (64-bit)| (default, Sep 22 2017, 02:03:08) [GCC 7.2.0] on linux with anaconda 3 – DeepML Nov 05 '17 at 16:39
  • are you using linux or macOS ? then open terminal type python and press `tab` on keyboard and you will see list of python interpreter installed. Here if you see python3.5 then select it and check if import works – Mahesh Karia Nov 05 '17 at 16:42
  • I have not python 3.5, but python 3.6. is the the problem? – DeepML Nov 05 '17 at 16:46
  • Yes `rllab3` is installed for `python 3.5.2` so it can not be access via 3.6 – Mahesh Karia Nov 05 '17 at 16:49
  • I used python 2.7, installed rllab 2 and successfully installed it. import rllab works but when I try: from rllab.algos.trpo import TRPO the result is: Traceback (most recent call last): File "", line 1, in from rllab.algos.trpo import TRPO File "/home/bayes/anaconda2/lib/python2.7/site-packages/rllab-0.0.0-py2.7.egg/rllab/algos/trpo.py", line 1, in .... ImportError: No module named joblib.pool – DeepML Nov 05 '17 at 18:48
  • The "can't read /var/mail/..." problem is a basic pilot error, and a duplicate of https://stackoverflow.com/questions/16069816/getting-python-error-from-cant-read-var-mail-bio – tripleee Jun 13 '22 at 05:09

1 Answers1

0

I know this thread is quite old, but I started working on rllab lately and this is my understanding. rllab3 is a conda envrionment similar to virtual environment, as mentioned in the rllab documentation. It doesn't have the actual modules installed within it, you'd need to install it seperately.

(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'

To use the package you need to have the actual package downloaded and the python path pointing to that package.

(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
>>>