a colleague not in this Slack brings this to my at...
# questions
j
a colleague not in this Slack brings this to my attention: Kedro seems to play not so nicely with in-tree venvs. the workflow would need to be something like this: 1. Install Kedro somehow to have the
kedro
CLI 2.
kedro new
creates a new directory 3.
cd {newdir} && python -m venv .venv
4. One needs to install Kedro inside the
.venv
again seems like this is not a problem if one uses out-of-tree environments, like conda does. Is there a way around for the other case? Something like: 1.
mkdir {newdir} && cd {newdir} && python3 -m venv .venv
2. Install Kedro in the new
.venv
3. (From
{newdir}
)
kedro new --here
👍 3
d
I always take the route of: 1. Create a virtual environment 2. Install Kedro 3.
kedro new
I think that's like the second workflow you put. Are you saying that doesn't work? Sorry, I didn't quite understand what worked and what didn't in your post. 😅
j
@Deepyaman Datta how do you create the virtual environment? what I meant is that, if one needs the project directory to create the environment there, one cannot do so until doing
kedro new
, it's a chicken-and-egg problem
👍 3
d
Got it, understood. I was just trying to reason about it (I just use Conda), but that makes sense now, thanks
👍🏼 1
s
I thought about this as well because of the recent update...
j
@Sebastian Pehle if I'm not mistaken, 0.18.5 didn't change anything in this regard, or am I missing something?
s
No, but in case of major alterings of functionality, a mish mash of kedro versions inside different envs (the one i 'kedro newed' with vs. the one that is currently installed in a perhaps later introduced project venv or something like that) would be problematic?
d
you shouldn’t have to worry about breaking changes between any 0.18.x versions
between 0.17.x and 0.18.x there are big differences though
a
Very relevant: https://github.com/kedro-org/kedro/issues/753 and https://github.com/kedro-org/kedro/issues/681 and https://waylonwalker.com/kedro-new/, Basically
pipx
would be the answer here I think, but we don’t hear many people ask this, I guess because it’s so common in the DS world to use conda.
@Sebastian Pehle as Joel said, any project you’ve created with 0.18.x will be compatible with any other kedro 0.18.y version. So e.g. if you created your project with
0.18.1
you should feel free to update kedro to
0.18.5
and there shouldn’t be any problems 🙂
j
good pointers @Antony Milne. I'm a big fan of pipx but I agree it requires yet one more thing to install for beginners, plus it doesn't really address the root cause (you still need 2 kedros: the one from
pipx
and the one installed inside the
.venv
). leaving a comment in the relevant issue
👍 2
went ahead and opened https://github.com/kedro-org/kedro/issues/2360 as a documentation issue
👍 1