Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #64799 > unrolled thread
| Started by | Luis Marsano <luis.marsano@gmail.com> |
|---|---|
| First post | 2014-01-26 17:30 -0500 |
| Last post | 2014-01-26 23:53 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
Help: python 3.3.3 (AMD64) scripts fail as non-admin user on Windows Server 2012 R2 Luis Marsano <luis.marsano@gmail.com> - 2014-01-26 17:30 -0500
Re: Help: python 3.3.3 (AMD64) scripts fail as non-admin user on Windows Server 2012 R2 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-26 23:53 +0000
| From | Luis Marsano <luis.marsano@gmail.com> |
|---|---|
| Date | 2014-01-26 17:30 -0500 |
| Subject | Help: python 3.3.3 (AMD64) scripts fail as non-admin user on Windows Server 2012 R2 |
| Message-ID | <mailman.6005.1390775429.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
I've installed python for all users with full permissions to all users
(see picture).
Python runs for all users.
However, scripts only work when I run as Administrator.
Running a script always results in an "ImportError: cannot import name" error.
Here, for example, is the output of "pip -h" run as an unprivileged user:
pip : Traceback (most recent call last):
At line:1 char:1
+ pip -h 2>&1 | Out-File -FilePath pip.txt
+ ~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Traceback (most recent
call last)::String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
File "C:\Open\Python33\lib\runpy.py", line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Open\Python33\lib\runpy.py", line 73, in _run_code
exec(code, run_globals)
File "C:\Open\Python33\Scripts\pip.exe\__main__.py", line 5, in <module>
ImportError: cannot import name main
I get regular output when I run "pip -h" as Administrator:
Usage:
pip <command> [options]
Commands:
install Install packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
search Search PyPI for packages.
wheel Build wheels from your requirements.
zip DEPRECATED. Zip individual packages.
unzip DEPRECATED. Unzip individual packages.
bundle DEPRECATED. Create pybundles.
help Show help for commands.
General Options:
-h, --help Show help.
-v, --verbose Give more output. Option is additive, and can be
used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output.
--log-file <path> Path to a verbose non-appending log, that only
logs failures. This log is active by default at
C:\Users\Safe Administrator\pip\pip.log.
--log <path> Path to a verbose appending log. This log is
inactive by default.
--proxy <proxy> Specify a proxy in the form
[user:passwd@]proxy.server:port.
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists:
(s)witch, (i)gnore, (w)ipe, (b)ackup.
--cert <path> Path to alternate CA bundle.
I can't figure out the issue: please help!
[toc] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2014-01-26 23:53 +0000 |
| Message-ID | <52e59fec$0$29999$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #64799 |
On Sun, 26 Jan 2014 17:30:21 -0500, Luis Marsano wrote: > I've installed python for all users with full permissions to all users > (see picture). > Python runs for all users. > However, scripts only work when I run as Administrator. Running a script > always results in an "ImportError: cannot import name" error. Here, for > example, is the output of "pip -h" run as an unprivileged user: This does not appear to be a Python problem. This appears to be a generic Windows permissions problem. My guess is that you've made sure that the Python .exe is executable by all users, but the standard library files are only readable by the Administrator user. -- Steven
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web