pathbird / poetry-kernel

Python Jupyter kernel using Poetry for reproducible notebooks
MIT License
246 stars 7 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'poetry'. #5

Closed andrewcstewart closed 2 years ago

andrewcstewart commented 2 years ago

Hey, cool project!

I got the following error, not sure how informative it is for you. Happy to dig into logs etc. I'm using a Gitpod workspace with a public github repo too, so could potentially offer a completely reproducible clean environment.

Failed to start the Kernel. 
FileNotFoundError: [Errno 2] No such file or directory: 'poetry'. 
twavv commented 2 years ago

Thanks for the report. This just means that poetry isn't installed -- or it isn't installed in a place that poetry-kernel knows where to look for it (i.e., it's not in the PATH).

If you're running pip install poetry-kernel, you'll also need to add pip install poetry as well. You'll also need to initialize the Poetry environment as poetry-kernel refuses to do that for you.

So, however you're running the commands, you'll probably need something like this:

$ pip install poetry poetry-kernel
...

$ cd path/to/project && poetry install
andrewcstewart commented 2 years ago

Hm, I have poetry installed but the default docker image used in gitpod workspaces uses pyenv or something so there might be some conflict. Good to know that it's the executable itself that can't be found, I can troubleshoot with that.

twavv commented 2 years ago

Gonna close this, but let me know if you get it solved. :^)