clearml-agent
clearml-agent copied to clipboard
Support for venv
Hello,
First thanks for sharing trains with the world, it looks very promising. I'm wondering why trains-agent uses virtualenv and not venv ? I usually use the latter, and when I tried trains-agent I got the following error
/usr/bin/python3.6: No module named virtualenv
trains_agent: ERROR: Command '['python3.6', '-m', 'virtualenv', '/home/florian/.trains/venvs-builds/3.6']' returned non-zero exit status 1.
I didn't know it could be a python module (I even thought it was kind of deprecated), so I then installed it (apt-get install python3-virtualenv
) but now even with Python base version being 3.6(agent.default_python = 3.6
), it creates a python 2.7 virtualenv:
New python executable in /home/florian/.trains/venvs-builds/3.6/bin/python2 Also creating executable in /home/florian/.trains/venvs-builds/3.6/bin/python Installing setuptools, pkg_resources, pip, wheel...done. Running virtualenv with interpreter /usr/bin/python2
May be I'm doing something wrong ?
OS: Ubuntu18.04 LTS
Hey @fcalvet ,
First, thank you :)
Then regrading your questions:
-
venv
was added to python on v3.3, since Trains also supports python 2.7 (yes people still use it), we chosevirtualenv
. Actuallyvenv
is dervied fromvirtualenv
, and was merged into python, but sincevirtualenv
is a python package, it is updated more frequently which is important when used as underlying infrastructure for an agent. - The fact that the trains-agent could not locate
virtualenv
is weird, since it in the trains-agent package requirements. Could you reinstall and see if the problem consists?$ pip install -U trains-agent
- It seems trains-agent is running your experiment with python2 (which is supported, but considering your virtualenv is for python 3.6, it seems wrong)
I would think this is some miss-configuration, how about deleting
~/trains.conf
and configuring it again with the wizard?$ trains-agent init
One last note, make sure that you installed trains-agent on the python3 not python2 on your system (Ubuntu 18.04 has both) I would suggest reinstalling trains-agent just in case.
$ pip3 uninstall trains-agent
$ pip2 uninstall trains-agent
$ pip3 install -U trains-agent