Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #64849

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

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <mail@timgolden.me.uk>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:Windows': 0.02; 'scripts': 0.03; 'win32': 0.03; '"""': 0.07; 'importerror:': 0.07; 'permissions': 0.09; 'runs': 0.10; 'subject:Help': 0.11; 'python': 0.11; 'windows': 0.15; 'from:addr:timgolden.me.uk': 0.16; 'from:name:tim golden': 0.16; 'imports': 0.16; 'luis': 0.16; 'message-id:@timgolden.me.uk': 0.16; 'modules.': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'simplest': 0.16; 'subject: \n ': 0.16; 'subject:non': 0.16; 'subject:user': 0.16; 'tjg': 0.16; 'subject:python': 0.16; 'files.': 0.16; 'wrote:': 0.18; 'users.': 0.18; 'bit': 0.19; 'module': 0.19; 'pointed': 0.19; 'work,': 0.20; '>>>': 0.22; 'import': 0.22; '(in': 0.22; 'issue.': 0.22; 'header:User- Agent:1': 0.23; 'received:192.168.100': 0.24; "haven't": 0.24; 'looks': 0.24; "i've": 0.25; 'script': 0.25; '(see': 0.26; 'post': 0.26; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'on,': 0.29; 'subject:) ': 0.29; 'skip:( 20': 0.30; "i'm": 0.30; 'getting': 0.31; "skip:' 10": 0.31; '"",': 0.31; 'file': 0.32; 'run': 0.32; 'running': 0.33; '(most': 0.33; 'could': 0.34; 'subject: (': 0.35; 'something': 0.35; 'but': 0.35; 'doubt': 0.36; 'words,': 0.36; 'thanks': 0.36; 'error.': 0.37; 'nov': 0.38; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'users': 0.40; 'skip:u 10': 0.60; 'full': 0.61; 'more': 0.64; 'worth': 0.66; 'results': 0.69; 'from:addr:mail': 0.83; 'fails,': 0.84; 'preventing': 0.84; '2013,': 0.91; 'subject:Server': 0.91
Date Mon, 27 Jan 2014 08:40:56 +0000
From Tim Golden <mail@timgolden.me.uk>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Help: python 3.3.3 (AMD64) scripts fail as non-admin user on Windows Server 2012 R2
References <CAHqJXRHh0MojQj0K65h_QbnOoN0+ywaiqmpnwgMNBFOSLid14w@mail.gmail.com>
In-Reply-To <CAHqJXRHh0MojQj0K65h_QbnOoN0+ywaiqmpnwgMNBFOSLid14w@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.6032.1390812061.18130.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1390812061 news.xs4all.nl 2889 [2001:888:2000:d::a6]:41650
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:64849

Show key headers only | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Help: python 3.3.3 (AMD64) scripts fail as non-admin user on Windows Server 2012 R2 Tim Golden <mail@timgolden.me.uk> - 2014-01-27 08:40 +0000

csiph-web