atom-python-debugger icon indicating copy to clipboard operation
atom-python-debugger copied to clipboard

virtualenv

Open Underbite-productions opened this issue 8 years ago • 11 comments

I do a lot of my python work within a virtual environment. I was wondering if this tool enables a particular python installation to be used as the debugger ?

Underbite-productions avatar Mar 16 '16 09:03 Underbite-productions

Currently, it's not possible to configure what Python interpreter should be used, but the debugger will use whatever /usr/bin/env python returns. So at least as a temporary workaround, if you start Atom from the command line when you're in a virtual environment, it should use the appropriate version of Python. I haven't tried though, so let me know if it works. I'll mark this as a future enhancement.

dpo avatar Mar 16 '16 15:03 dpo

This package seems relevant but might be outdated: https://atom.io/packages/virtualenv

dpo avatar Mar 16 '16 15:03 dpo

@Underbite-productions You may want to try the python_exe branch. You'll be able to set what interpreter you want to use. The PYTHONPATH doesn't follow yet.

dpo avatar Mar 19 '16 05:03 dpo

The interpreter config is now part of the latest update.

dpo avatar Mar 19 '16 14:03 dpo

Can you also look into autocomplete-python source and add $PROJECT substitution for current path?

As far as i can see, all related code is in applySubstitutions function: https://github.com/sadovnychyi/autocomplete-python/blob/5637b6ae4a19d5d720ee85167a44a4a02df6d92a/lib/interpreters-lookup.coffee#L56

WeirdCarrotMonster avatar Mar 19 '16 15:03 WeirdCarrotMonster

I'm not sure what you mean. Do you mean to add the project path to the PYTHONPATH?

dpo avatar Mar 19 '16 18:03 dpo

Ah, you mean this.

dpo avatar Mar 19 '16 18:03 dpo

+1 for this feature ;)

Bengrunt avatar Mar 24 '16 09:03 Bengrunt

Which feature? Virtualenv support or $PROJECT substitution? Note that you can vote up individual comments.

dpo avatar Mar 24 '16 12:03 dpo

Sorry, just skimmed through the issue. I was voting up for the virtualenv support :)

Bengrunt avatar Mar 24 '16 12:03 Bengrunt

the virtualenv package is maintained here https://github.com/pghilardi/atom-python-virtualenv

polmonso avatar May 11 '20 14:05 polmonso