windows7安装python运行错误_在Windows7上安装Python和distribute会给出“写入失败。。。权限被拒绝“...

我在Windows7上(我完全承认我不理解的权限模型)。我在其他的标签页上读到了。)我的用户是管理员。当我试图运行“python distribute_setup.py”时,写入失败。。。“权限被拒绝”错误,然后“错误:无法在安装目录中创建或删除文件”。

我刚刚从Python.org安装了Python 3.2.2msi安装程序。

我正在安装32位Python,即使我是在64位Windows上,因为我有一些依赖项需要它(pyglet,一个OpenGL库)

我下载了distribute_setup.py并从命令行运行“python distribute_setup.py”。

在这段大量无用的文字中,有一些隐藏的错误信息:root: Generating grammar tables from E:\Program Files (x86)\Python3.2.2\Lib\lib2to3\PatternGrammar.txt

root: Writing grammar tables to E:\Program Files (x86)\Python3.2.2\Lib\lib2to3\PatternGrammar3.2.2.final.0.pickle

root: Writing failed:[Errno 13] Permission denied: 'E:\\Program Files (x86)\\Python3.2.2\\Lib\\lib2to3\\PatternGrammar3.2.2.final.0.pickle'

这三行重复大约二十次,然后:Scanning installed packages

No setuptools distribution found

error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the

installation directory:

[Errno 13] Permission denied: 'E:\\Program Files (x86)\\Python3.2.2\\Lib\\site-packages\\test-easy-install-5924.write-test'

目录“E:\程序文件(x86)\ Python3.2.2\Lib”允许管理员“完全控制”。我的用户是管理员(选中的权限复选框全部变灰-即使我想关闭“完全控制”或任何其他权限,也无法关闭)

我推测我试着在“用户”组和“管理员”组中添加“完全控制”。重新运行时,我不再得到相同的错误,但它在同一点退出,具有:Scanning installed packages

No setuptools distribution found

build\src\setuptools\command\easy_install.py:289: UserWarning: Unbuilt egg for distribute [unknown version] (c:\users\jhartley\appdata\local\temp\tmpr0dzkz\distribute-0.6.24\build\src)

self.local_index = Environment(self.shadow_path+sys.path)

warning: no files found matching 'Makefile' under directory 'docs'

warning: no files found matching 'indexsidebar.html' under directory 'docs'

error: E:\Program Files (x86)\Python3.2.2\Scripts: Access is denied

没有“E:\程序文件(x86)\ Python3.2.2\Scripts”目录。我创造了一个。它归“administrators”所有,并为administrators设置了“完全控制”。我注意到所有其他Python文件和目录都归“SYSTEM”所有。再次跑步可以:Scanning installed packages

No setuptools distribution found

build\src\setuptools\command\easy_install.py:289: UserWarning: Unbuilt egg for distribute [unknown version] (c:\users\jhartley\appdata\local\temp\tmp1kmbk6\distribute-0.6.24\build\src)

self.local_index = Environment(self.shadow_path+sys.path)

warning: no files found matching 'Makefile' under directory 'docs'

warning: no files found matching 'indexsidebar.html' under directory 'docs'

error: E:\Program Files (x86)\Python3.2.2\Scripts\easy_install-script.py: Permission denied

即使“Scripts”目录授予管理员“完全控制”权限,我还是尝试为Users组添加“完全控制”。重新运行确实会产生一些警告:Scanning installed packages

No setuptools distribution found

build\src\setuptools\command\easy_install.py:289: UserWarning: Unbuilt egg for distribute [unknown version] (c:\users\jhartley\appdata\local\temp\tmp31bznf\distribute-0.6.24\build\src)

self.local_index = Environment(self.shadow_path+sys.path)

warning: no files found matching 'Makefile' under directory 'docs'

warning: no files found matching 'indexsidebar.html' under directory 'docs'

但似乎成功完成了。

但是,运行“easy_install virtualenv”将生成一个用户帐户控制对话框“是否允许来自未知发布服务器的以下程序对此计算机进行更改?”然后创建一个新的CMD窗口,该窗口闪烁并消失得太快,以至于看不见,而且似乎不起作用:virtualenv尚未安装。

我想阻止每次出现UAC对话框。很烦人:“easy_install”是一个我信任的程序,我不应该每次运行它时都需要确认。我能找到的阻止UAC对话框出现的所有解决方案都涉及到创建一个到可执行文件的神奇的双击快捷方式。我还没有找到任何命令行应用程序。

我还想阻止easy_install在新的cmd窗口中启动。这使得无法看到输出。此问题似乎与UAC对话框无关,因为全局关闭UAC意味着easy_install将在没有该对话框的情况下运行,但它仍在新窗口中运行。

怎么回事?我做错什么了?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值