0

I'm trying to convert QT .ui file into .py file.

Found several issues saying ".exe's won't run from a directory with spaces". I was struggling with the same issue, and found that there were multiple copies of .exe file on my drive.

C:\shbaek>where.exe pyuic5

C:\Program Files\Miniconda3\Scripts\pyuic5.exe

C:\Users\MSOlab\Miniconda3\Scripts\pyuic5.exe

C:\Users\MSOlab\Miniconda3\Library\bin\pyuic5.bat

And I was running the command line as Administrator, so calling pyuic5 would access the one from \Program Files\. When I directly change directory to second one and run pyuic5, it runs without any error but the first one would give an error massage as follows.

Fatal error in launcher: Unable to create process using '"'

Running the prompt without Admin privilege automatically runs the second one (from \Users\) without any error.


So, am I supposed to run cmd without Admin privilege to avoid those issues? Or is there any possible way to force the Admin cmd run pyuic5 from the \Users\ path?

Community
  • 1
  • 1
  • Simply deleting the \Program Files\...\Miniconda3 from the system `PATH` solved the issue. I guess. – Sanghyun Baek Jan 06 '17 at 01:31
  • Should I delete the thread or just leave it so others can see? – Sanghyun Baek Jan 06 '17 at 01:34
  • FYI, "run as administrator" generally uses your unrestricted token if your account is in the "BUILTIN\Administrators" group. It's not running as *the* "Administrator" account (RID 500), which is typically disabled since Vista. Thus `PATH` isn't normally defined differently in an admin command prompt. That said, per-user mapped drive letters from your standard logon won't be available since your unrestricted token is a different logon session, so avoid using them in `PATH`. – Eryk Sun Jan 06 '17 at 01:43
  • @eryksun Thanks for reply. I never knew that hard drive partitions can be mapped to separate logon accounts. So, there should exist at least one default common drive for every user, such that any unrestricted token can use? – Sanghyun Baek Jan 06 '17 at 06:42
  • I was talking about mapped network drives, e.g. mapping `\\server\share` to drive `Z:`, or a `subst` drive that maps `C:\very\long\path` to drive `Y:`. Such mappings are usually set up for the current user at logon. So if you had `Z:\Python` in `PATH`, where `Z:` is a mapped drive, it wouldn't be available in an admin command prompt because the process access token is associated with a different logon session. – Eryk Sun Jan 06 '17 at 07:06
  • @eryksun Ohhhhh now I get it. Are there any known situations where one would need to set mapped drives as `env PATH`? – Sanghyun Baek Jan 06 '17 at 08:56

0 Answers0