First time here? Check out the FAQ!

WingIDE, pyside2, and Miniconda on windows

I'm trying to use WingIDE to edit a PySide2 application on Windows (initial writing and debugging occurred on a Mac, and I'm now trying to get it working on windows). My install of python is from Miniconda, version 3.7.1, but I installed pyside2 via pip (in the anaconda prompt) because the version installed by conda install was too old for my purposes. When I run my script from the Anaconda prompt it works properly, which leads me to believe that PySide2 is installed correctly.

However, when I try to launch the same script from inside WingIDE, or, in fact, just try to import PySide2 from the python shell, it fails with the following error:

>>>import PySide2
Traceback (most recent call last):
  Python Shell, prompt 6, line 1
    # Used internally for debug sandbox under external interpreter
  File "C:\Users\Israel\Miniconda3\Lib\site-packages\PySide2\", line 51, in <module>
  File "C:\Users\Israel\Miniconda3\Lib\site-packages\PySide2\", line 21, in _setupQtDirectories
    import shiboken2
  File "C:\Users\Israel\Miniconda3\Lib\site-packages\shiboken2\", line 8, in <module>
    from .shiboken2 import *
builtins.ImportError: DLL load failed: The specified module could not be found.

Which would indicate to me that it is being unable to find/load a DLL that is being found and loaded properly when running the Anaconda prompt. I have compared the python path between the two instances of python, and aside from some ordering differences they are the same. Additionally, I have confirmed that Wing is running the same executable as the Anaconda prompt, and I do not have multiple installs of python on my system anyway (I set it up clean just for this). What am I missing? Something in the environment variables?

ibrewster's avatar
asked 2019-04-17 15:59:52 -0500
edit flag offensive 0 remove flag close merge delete


add a comment see more comments

1 Answer


This is very likely the issue described at and under Fixing Import Errors in the How-To for Anaconda:

Wingware Support's avatar
Wingware Support
answered 2019-04-18 07:12:18 -0500
edit flag offensive 0 remove flag delete link


Oh, I see where I went wrong. I looked at those pages, but failed to recognize the difference between the Python path and the environment path. Reading over them again, I see that they clearly state to set the ENVIRONMENT path, and of course doing so solves the issue. Thanks.

ibrewster's avatar ibrewster (2019-04-18 12:24:21 -0500) edit

Yes, it is confusing. PYTHONPATH is used to find Python packages and modules and PATH is needed to find other DLLs used by those packages and modules. Seems like Anaconda's python.exe should just set PATH but unfortunately it doesn't.

Wingware Support's avatar Wingware Support (2019-04-18 12:39:05 -0500) edit

Wing 7.2+ detect Anaconda and set up the necessary environment so this should no longer be an issue an no manual set up is needed anymore.

Wingware Support's avatar Wingware Support (2020-01-22 20:04: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