Ask Your Question

Using Black with an Activated Env

asked 2020-02-04 16:30:07 -0600

RunDeep's avatar

updated 2020-02-12 09:05:02 -0600

I've used Anaconda with Wing projects for quite a while by pointing to the env python.exe and adding to the path in the project settings. Then using OS Commands I could run Black:

${WING:PYTHON} -m black --target-version py36 ${WING:FILENAME}

I've switched over to the setup described here: and I can debug my scripts in Wing but when I try to run Black I get:

Process failed to start: Could not create process (last error=2): activate C:\SVNRepo\projects-sw\Agile_new\trunk\env -m black --target-version py36 C:\SVNRepo\projects-sw\agile_db_py3\trunk\env\projects\

I've tried several variations with no luck... How do I set this up?

In the project settings I have Python Executable set to Activated Env; activate C:\SVNRepo\projects-sw\Agile_new\trunk\env

Python Path is Use default (rev 2e712fd65dd4) Win 7 64, 32 bit Python

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2020-02-12 09:04:52 -0600

This should be fixed in update, which you can get with Check for Updates from the Help menu. Please let us know if that doesn't solve it.

edit flag offensive delete link more

answered 2020-02-04 21:45:32 -0600

Looks like there is a bug with Black and YAPF reformatting support when the Python Executable is set to Activated Env.

A work-around would be to get the value of sys.executable from the activated env (e.g. from Wing's Python Shell) and use that value for Command Line instead for the Python Executable in Project Properties. Then it should correctly start Black.

We'll try to fix this soon. Thanks for reporting this problem!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-02-04 16:30:07 -0600

Seen: 461 times

Last updated: Feb 12 '20