First time here? Check out the FAQ!

Using wing pro with pyscaffold

I use pyscaffold to create all my projects and conda to manage the virtual environments. Everything just works in all IDEs (or it has to date). In Wing 7.2 the package imports all show errors, and pytest will not run (it fails with cannot read any output from test runner). The correct environment is active and package modules all run, although the editor shows imports as invalid (even though everything works). Tried under linux and windows. Any ideas?

andykmiles's avatar
asked 2020-01-28 14:43:00 -0500
Wingware Support's avatar
Wingware Support
updated 2020-02-12 09:04:16 -0500
edit flag offensive 0 remove flag close merge delete


Is Wing using the right Python or venv? What is the Python Executable in Project Properties set to? Also, you can see the effective Python Path, which would affect whether Wing finds modules in imports, in the Source > Show Python Environment dialog.

Wingware Support's avatar Wingware Support (2020-01-28 20:44:32 -0500) edit

Yes I'm using the correct venv, and I have project properties set to activate it with the correct command. The environment is definitely active and all modules are found, but pytest just does not complete successfully. I have tried this on windows and linux. It is easy to reproduce. Just try running pytest

andykmiles's avatar andykmiles (2020-02-02 13:04:51 -0500) edit

What version of pytest is it? Also is it failing in the Testing tool or in the debugger with code started outside of that tool?

Wingware Support's avatar Wingware Support (2020-02-03 08:08:47 -0500) edit

I've not been able to reproduce this yet, so having some more info and/or a test case would be useful. What _might_ be relevant is that Wing 7.2 detects when Python is Anaconda and calls 'conda activate base' to avoid environment bugs seen before we did this. This works around Anaconda's assumption that you're using conda envs (with 'conda activate'). When that isn't used, Anaconda does not set up PATH right so loading some DLLs fails. Activating base does work using virtualenv instead (as opposed to conda envs), but perhaps there's an issue with this. One idea is to try both setting Python Executable to Command Line and entering the virtualenv's Python, and also setting it to Activated Env and entering the activate command instead, in case one or the other of those is not subject to any problem that may exist ... (more)

Wingware Support's avatar Wingware Support (2020-02-04 08:53:35 -0500) edit

This is probably due to a bug in Wing <=, when Python Executable is set to Activated Env. Finding the value of sys.executable and using that with the Command Line option for Python Executable instead is a work-around. We're working on a fix.

Wingware Support's avatar Wingware Support (2020-02-06 15:45:49 -0500) edit
add a comment see more comments

1 Answer


If it was the issue with using Activated Env for Python Executable, then this should be fixed in update, which you can get with Check for Updates in the Help menu. Please let us know if that does not solve it.

Wingware Support's avatar
Wingware Support
answered 2020-02-12 09:04:04 -0500
edit flag offensive 0 remove flag delete link


It is fixed! I am massively impressed at your follow up and fixing this. I love Wing Pro, and I teach about 60 students a year, and I always recommend it. Great support - thank you

andykmiles's avatar andykmiles (2020-02-17 13:23:15 -0500) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer