Affichage des articles dont le libellé est 3.3.3. Afficher tous les articles
Affichage des articles dont le libellé est 3.3.3. Afficher tous les articles

lundi 27 janvier 2014

Re: Help: python 3.3.3 (AMD64) scripts fail as non-admin user onWindows Server 2012 R2 topic




On 26/01/2014 22:30, 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.


As Steven's pointed out, this looks more like a Windows permissions
issue. However, it would still be worth identifying what's going on, as
I haven't run Python on a 2012 box (and I doubt if many other people
have either). I'm getting a VM run up to try it out but that will take a
while.

It may be that some hardened security is preventing Python from reading
its own files. Could you, please, do the simplest of imports which
fails, and post the traceback from the console in its entirety? (In
other words, something like this):

"""
Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:18:40) [MSC v.1600 32
bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import willnotimport

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'willnotimport'
>>>

"""

It would be good to know whether *anything* imports, ie whether stdlib
imports work, or whether it's just user-installed modules.


Thanks

TJG





dimanche 26 janvier 2014

Re: Help: python 3.3.3 (AMD64) scripts fail as non-admin user onWindows Server 2012 R2 topic




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