Setting up Nova Python debugger with Poetry and Pyenv?

Hi, I am trying to set up the new Nova debugger with python. However, I am having issues setting up it with poetry and pyenv. Is there any guild or documentation that I can look into on this?

Have you tried taking advantage of Task Pipelines? It’s another new feature in Nova 9. I haven’t used pyenv nor poetry, so I’m not sure if they’ll work with pipelines (run in separate processes, I believe).

In project settings, click the disclosure “arrow” to the left of the Python debug task you added, which will show the Build, Run, and Clean components of the Task. Select Run (only component added to Python debugger). Click the plus button and choose Run Script. Add your pyenv command. You can then drag it above Run so that it happens before the debugger is run. (See below – I have no idea if that’s a valid pyenv command)

Hi, @drew Thanks for the reply. I am not 100% sure how the task pipeline will help with the issue.

Pyenv helps to set p specific python venv in different projects (so using a different python version than what the OS run on) and poetry will act as a package manager and runner for the project.

For example. I will use pyenv to set python version 3.8 for my project and use poetry to run it as following poetry run python (where python here will be automatically using the interpreter in the venv)

I think the issue I am having with Nova is that while the python debugger relay on the local version of the python, there is no way (as far as I am aware) to detect and run the code with the dedicated virtual env for the project. And this will be an issue for python developers who work with multiple projects with different versions of Python.

I really hope I am missing something here and can setup Nova debugger with python venv as this will make me jump from PyCharm to Nova completely.

Again, I haven’t actually used pyenv or poetry, and it’s possible Panic devs haven’t either. I think the main issue is trying to run scripts under poetry when Panic’s extension expects to run python directly. I’d encourage you to open a feature request for Panic’s Python extension to support Poetry on Nova’s help page – more appropriate than here since it’s not a feature request for the Extension API.

For someone using the more common virtualenv tool (or Python’s venv module), they should be able to use it with pyenv. Then in Project Settings → Python extension they’d set the interpreter to be the virtualenv’s bin/python. This setting defines the interpreter used to run scripts and for debug sessions.