Unanswered
Hi All, I'M Having A Problem Where Theclearml Venv Does Not Get The Pythonpath From Local Machine. This Led To A Very Ugly And Non-Pythonic Temporal Fix Using Sys.Path.Append In Imports.
How Do I Make Sure The Clearml Venv Gets The Correct Pythonpath On C
Hi FierceHamster54 , SuccessfulKoala55 and CostlyOstrich36 ,
I have a machine (for simplicity, let's say just one machine with ubuntu) with multiple repositories of my own packages (let's call them my-util and my-service), python and clearml. path to my-util is defined in the system PYTHONPATH. my-service is importing utils from-my-util.
On the same machine, running a code from my-service using python works. running the same code using an agent fails on imports from my-util, saying it cannot find my-util. The agent is using clearml temp venv (the one stored under /.clearml/ folder).
My temporary (and very non-pythonic) solution was adding
import os
import sys
sys.path.append(os.path.join(git_path,my_utils_repository_path))
to the top of my code.
I'm looking a better solution
173 Views
0
Answers
one year ago
one year ago