Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to execute python from conda environment by dvc run

I have an environment of conda configurated with python 3.6 and dvc is installed there, but when I try to execute dvc run with python, dvc call the python version of main installation of conda and not find the installed libraries.

$ conda activate py36
$ python --version
Python 3.6.6 :: Anaconda custom (64-bit)
$ dvc run python --version
Running command:
    python --version
Python 3.7.0
Saving information to 'Dvcfile'.
like image 411
Heros Avatar asked Nov 08 '18 17:11

Heros


2 Answers

The version 0.24.3 of dvc correct this problem.

like image 110
Heros Avatar answered Oct 13 '22 00:10

Heros


This may solve your problem:

dvc run $(which python) --version
like image 25
Paulo Alves Avatar answered Oct 13 '22 00:10

Paulo Alves