机械化无法由easy_install安装吗? [英] Mechanize not being installed by easy_install?

查看:57
本文介绍了机械化无法由easy_install安装吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从旧的Win2K机器迁移到新的,功能更强大的Vista 64位PC的过程中.大部分迁移都进行得相当顺利-但我确实发现我需要重新安装所有与Python相关的工具.

I am in the process of migrating from an old Win2K machine to a new and much more powerful Vista 64 bit PC. Most of the migration has gone fairly smoothly - but I did find that I needed to reinstall ALL of my Python related tools.

我已经下载了mechanize-0.1.11.tar.gz文件,并运行easy_install进行安装.这样就产生了C:\ Python25 \ Lib \ site-packages \ mechanize-0.1.11-py2.5.egg.

I've downloaded the mechanize-0.1.11.tar.gz file and ran easy_install to install it. This produced C:\Python25\Lib\site-packages\mechanize-0.1.11-py2.5.egg.

然后我运行了一个python脚本进行测试,并且在解释器下运行良好.但是,当我运行py2exe来编译脚本时,收到一条消息,提示找不到机械化.

I then ran a python script to test it, and it worked fine under the interpreter. But, when I ran py2exe to compile the script, I get a message that mechanize cannot be found.

然后我将鸡蛋移到一个新文件夹,使用easy_install进行安装-并获得表明它确实已安装的所有提示.

I then moved the egg to a new folder, used easy_install to install it - and got every indication that it did install.

但是,当尝试使用py2exe时,我仍然收到相同的消息-机械化不存在!

But, I still get the same message when trying to use py2exe - that mechanize does not exist!

我搜索了整个磁盘的机械化",结果只得到了2个egg文件.安装应生成哪些文件-我应该将它们放置在哪里?

I did a search for "mechanize" of the entire disk, and get only the 2 egg files as a result. What files should be produced by the install - and where should I expect them to be located?

很明显,我在这里遗漏了一些东西……有什么建议吗?

Obviously, I'm missing something here...any suggestions?

另外,也许相关,我正在运行的python是32位2.5.4版本...这是我以前的工作,想要在安装64位版本之前使所有组件正常工作-另外,我没有看不到一些似乎支持64位版本的工具(easy_install& py2exe).这是问题的一部分,我是否需要安装&运行64位版本-对于那些运行32位PC的人来说,在我运行脚本时会遇到问题吗?

Also, perhaps related, the python I am running is the 32 bit 2.5.4 version...which is what I had before and wanted to get everything working properly prior to installing the 64 bit version - plus, I don't see some of the tools (easy_install & py2exe) which seem to support the 64 bit versions. Is that part of the problem, do I need to install & run the 64-bit version - and will that be a problem for those who run 32-bit PC's when they run my scripts?

推荐答案

有一个请注意py2exe站点,如果源为egg格式则无法运行:

There is a note on the py2exe site that it does not work if the source is in egg format:

py2exe当前不可用(截至 0.6.5)如果您的程序中的某些依赖项处于开箱即用的状态 .egg形式.

py2exe does not currently (as of 0.6.5) work out of the box if some of your program's dependencies are in .egg form.

如果程序本身不使用 setuptools工具(例如, pkg_resources),那么您所需要做的就是 要做的是确保依赖项是 以解压缩的方式安装在您的系统上 形式,而不是压缩的.egg.

If your program does not itself use setuptools facilities (eg, pkg_resources), then all you need to do is make sure the dependencies are installed on your system in unzipped form, rather than in a zipped .egg.

一种实现此目的的方法是使用 -始终将选项解压缩到easy_install .

您正在运行哪个版本? pypi.python.org上列出的最新版本是0.6.9,但没有迹象表明我可以找到此发行版中是否解决了鸡蛋问题.

Which version are you running? The latest version listed at pypi.python.org is version 0.6.9 but there is no indication I can find if the problem with eggs is fixed in this release.

这篇关于机械化无法由easy_install安装吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆