0

I'm not sure how to phrase my problem, and have tried to find similar problems online, but I could not (Perhaps with better phrasing I could, so I am sorry if this is a duplicated question!)

Anyhow, I'm trying to run pyuic5 (to test it works). So, I open CMD (In the directory my .ui file is) and when I enter pyuic5 I get:

Fatal error in launcher: Unable to create process using '"C:\users\andrew\appdata\local\programs\python\python37\python.exe" C:\Program Files (x86)\Python37-32\Scripts\pyuic5.exe"'

Note: C:\Program Files (x86)\Python37-32 is the correct directory

My PATH variables are correct I believe. I've added all the screenshots I thought may be useful.

Here is my appdata/local/... folder

Here is my CMD window

Here is my PATH variable

Here is the command being 'ran'

Here is 'pip list' with PyQT highlighted, showing ALL packages

Please let me know if you need more information, I'm pretty new to python. Thanks guys

[ps I'm using the 32bit version as 64bit caused some issues for me]

2 Answers 2

1

Have you tried running CMD as Administrator? Also, try running python --version in CMD to verify you python installation. it should output your default python version.

1
  • Yes mate I've tried a few times, the version running comes out with only one result (as expected) = Python 3.7.3
    – Mozza
    Commented Jul 3, 2019 at 14:27
0

C:\Program Files (x86) is a bad place to install Python (and thus its related modules), as spaces in your path(s) can cause scripts to fail.

Likewise, C:\Program Files and C:\Program Files (x86) are (potentially) treated differently by Windows (as special system folders), meaning this can cause other issues besides just the ones regarding spaces.

As a serious recommendation, I would suggest doing the following:

  • Use pip freeze (e.g. as python -m pip freeze > requirements.txt) to create a current list of your installed modules.

  • Uninstall Python 3.7 completely.

  • Reinstall Python 3.7 in a path without spaces (e.g. under C:\Programs\Python37-32 or something similar).

  • Use e.g. python -m pip install -r requirements.txt to reinstall your current modules.

Even if this doesn't solve your exact problem, this will likely save you an unknown number of headaches in the future.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .