setup.py 有问题 [英] Having trouble with setup.py

查看:52
本文介绍了setup.py 有问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 python 一段时间了,但我不记得我以前是如何安装模块的,我永远不需要.我最近重新安装了 ubuntu,所以现在我需要重新安装.

I've been using python for a while but I can't remember how I used to install modules, I haven't needed to in forever. I recently reinstalled ubuntu so now I need to.

首先,我尝试运行 setup.py 并得到这个:

Firstly, I try to run setup.py and get this:

nicholas@nicholas-K53E:~$ python setup.py install
python: can't open file 'setup.py': [Errno 2] No such file or directory

我尝试使用突触来安装 BeautifulSoup,但它也不起作用,并且 python 告诉我没有名为该名称的模块.

I tried using synaptic to install BeautifulSoup but it didn't work either and python tells me there's no modules named that.

一些论坛说这与位于错误的工作目录有关,所以我 cd 到我的 Python26 文件夹并尝试从那里运行 python ./setup.py install 但它仍然没有工作.我不确定这笔交易是什么.

Some forums said that it had to do with being in the wrong working directory so I cd'd into my Python26 folder and tried to run python ./setup.py install from there and it still didn't work. I'm not sure what the deal is.

有什么指导吗?

推荐答案

sudo apt-get install python-setuptools

sudo aptitude install python-setuptools

然后运行:

sudo easy_install <module>

例如

sudo easy_install BeautifulSoup

这篇关于setup.py 有问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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