I have python installed here:

C:\Program Files\QGIS 2.18\apps\Python27\Lib\site-packages\pythonwin

When I click on pythonWIn I get this error: The application cannot locate win32.ui.pyd (or Python) 126. The specified module could not be found. I got python 2.7.5 when I downloaded and installed QGIS 2.18.

1 Answer 1


At the first glance it seems like you need to set the python path variable to your specific folder.

  • Did you check if your machine has a python path variable?
  • Did you try to reinstall pythonWin.?
  • Did any other IDLE work?

For a detailed look see this question: Adding python path. Short summing up:

  1. Right click on "My computer"
  2. Click "Properties"
  3. Click "Advanced system settings" in the side panel
  4. Click "Environment Variables"
  5. Check if the variable pythonpath is set and if not, add it with your path as argument

If this does not solve the problem try do the steps 1 to 4 and append the path of python to the Path variable, as described in the this answer

If I missed the point please let me know so I cant adjust my answer.

  • Added python path with directory argument from above. Same reult. Tried adding it to path variable. Same result. Do I need to reinstall python? If so do I need to put in QGIS 2.18\apps ?
    – geoJshaun
    Apr 15, 2017 at 16:38
  • do you have another python installation beside the one from qgis? I would not recommend installing it in the qgis folder because of the dependencies qgis has.
    – LaughU
    Apr 15, 2017 at 17:43
  • Should i uninstall it from QGIS or can I have it installed in two different locations?
    – geoJshaun
    Apr 15, 2017 at 19:17
  • I reinstalled python without uninstalling it from the QGIS directory in program files. I then downloaded and installed pythonwin. Works fine now although I'm curious to see what will happen when i run QGIS scripts. Thanks LaughU
    – geoJshaun
    Apr 15, 2017 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.