-1

I am currently building a desktop app and recently noticed that there are issues with importing modules on Win 10.

For example, running the following on Win 7 without python installed works:

import win32con

But running it on a Win 10 machine without python installed yields:

No module named 'win32con'

This is just an example; there are many other modules which throw an ImportError when ran on Win10 but work on Win7, both without Python installed

Of course, running pip install on Win10 installs the module, but my goal is to have the app run on Win10 without having Python installed to run pip install.

Any idea why this happens and how to fix it?

Alin Iuga
  • 250
  • 4
  • 11
  • 9
    How are you running python code without having python installed? – Aran-Fey Apr 17 '18 at 08:16
  • How can you run the app on Win 10 if python is not installed? Do build the app into a .exe before running it? – Yassine Faris Apr 17 '18 at 08:16
  • I am sorry for omitting this. Yes, I am using an .exe built with pyinstaller – Alin Iuga Apr 17 '18 at 08:17
  • Possible duplicate of [What's win32con module in python? Where can I find it?](https://stackoverflow.com/questions/227928/whats-win32con-module-in-python-where-can-i-find-it) – Klaus D. Apr 17 '18 at 08:18

1 Answers1

0

Solved by using cx_Freeze instead of pyinstaller to build the package.

Alin Iuga
  • 250
  • 4
  • 11