Python:缺少setup.py:没有这样的文件或目录 [英] Python: setup.py missing: No such file or directory
问题描述
我尝试更新libxml2&我的libxslt软件包太旧,无法与lxml一起运行.我在此处找到了演练,并尝试使用命令更新软件包
I tried to update the libxml2 & libxslt packages as mine are too old to run with lxml. I found a walkthrough here and tried to update the package with the command
sudo python setup.py install
但是我得到的是以下错误消息:
but what I got was this error message:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS
/Python: can't open file 'setup.py': [Errno 2] No such file or directory
因此,显然我的Python文件夹中没有setup.py文件(这是我当前的Python版本,我已经检查过!).这怎么可能?希望有人能帮助我!
So apparently there is no setup.py file in my Python folder (this is my current Python version, I already checked this!). How is this possible? Hope someone can help me!
推荐答案
要从我的评论中将此作为正式答案...
To make this a formal answer from my comment...
setup.py不是python安装位置的一部分.它包含在您要安装的软件包中.将目录更改为您下载的源的位置,然后运行setup.py文件.
setup.py is not part of the python installation location. It is included with the package that you wish to install. Change directories to the location of the source that you downloaded and then run the setup.py file.
这篇关于Python:缺少setup.py:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!