0

When I try to import CX_Freeze I get this error:

enter image description here

But I tried to compile a pygame script I made anyways and I got this error:

enter image description here

If you can help me that would be great. Thank you

user4157124
  • 2,809
  • 13
  • 27
  • 42
Raven
  • 31
  • 7
  • 2
    Please read [Discourage screenshots of code and/or errors](https://meta.stackoverflow.com/questions/303812/discourage-screenshots-of-code-and-or-errors). Paste the error trace! – Rabbid76 Jun 02 '22 at 04:52

2 Answers2

0

try the below command to see you installed packages:

pip list

If you do not see cx_Freeze displayed in the list try to install by this command:

pip install --upgrade cx_Freeze
Javad
  • 2,033
  • 3
  • 13
  • 23
  • I did that but when I try to install it, it gives me an error I look at the list, and it's not there. – Raven Jun 02 '22 at 05:13
  • 1
    [Here](https://stackoverflow.com/questions/44951456/pip-error-microsoft-visual-c-14-0-is-required) you can see how you can upgrade your c++ and then you can install `cx_Freeze` via pip. – Javad Jun 02 '22 at 05:42
0

As the error states, you need to install or update Microsoft Visual C++ to 14.0 or greater. If you don't want to, try other modules such as py2exe See also: https://www.pygame.org/wiki/Pygame2exe

AzlanCoding
  • 209
  • 2
  • 11
  • Please remember that you need to run `pip install cx_Freeze` again after installing Microsoft Visual C++ 14.0 or greater – AzlanCoding Jun 02 '22 at 23:34