Linux / Python问题 [英] Linux/Python Issues

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

问题描述

我去了Python.org,DL'给Python 2.5源代码按照通常的

不合适的说明并成功运行make文件(有点)。

Python 2.5工作正常。但是来自Tkinter import *得到一个什么

Tkinter?"信息。 IDLE'无处可寻。


说明书中没有的是当我下载
时我应该在哪个目录中?我应该把.bz2放在哪里?文件?什么目录运行

make文件?目前我正在研究Windows机器,危及我的理智还剩下什么。


我正在使用Linspire,所以Debian目录可能是那些

将让我启动并运行的目录。除了特定的知识,即使是一些好的

猜测也会受到赞赏。

解决方案

2月17日,20:38,MartinRineh ... @ gmail.com写道:


我去了Python.org,DL'的Python 2.5源代码按照惯例

说明不充分并成功运行make文件(排序)。

Python 2.5工作正常。但是来自Tkinter import *得到一个什么

Tkinter?"信息。 IDLE'无处可寻。



可能是你没有安装Tcl / Tk库,或者

也许是Tcl / Tk的头文件没安装。如果是这样,Python

在配置时就不会检测到它们,然后你就可能没有安装Tkinter扩展名了。
< blockquote class =post_quotes>
当我下载
时,说明书中没有的是我应该在哪个目录中?我应该把.bz2放在哪里?文件?什么目录运行

make文件?目前我正在研究Windows机器,危及我的理智还剩下什么。


我正在使用Linspire,所以Debian目录可能是那些

将让我启动并运行的目录。除非有特定的知识,否则即使是一些好的猜测也会受到赞赏。



这里有一页可能告诉你你已经知道的东西:

http://wiki.python.org/moin/BeginnersGuide/Download


在基于Debian的Ubuntu上,python-tk软件包应该可以使用,这样你就可以在你的知识库中找到它。从源代码构建

,你可以将.bz2文件放在任何地方,并且

将它解压缩到任何不会弄乱你清理的地方

之后。例如,您可以将Python .bz2文件下载到

" downloads"目录驻留在您的主目录中,然后您可以

这样做:


mkdir软件

cd software

tar jxf~ / downloads / Python-2.5.1.tar.bz2

cd Python-2.5.1

../configure

make


然后你可以做一个make install拥有正确的特权。


Paul


Ma ************ @ gmail.com schrieb:


我去了到Python.org,DL''dig's 2.5源代码按照通常的

不足说明并成功运行make文件(排序)。

Python 2.5工作正常。但是来自Tkinter import *得到一个什么

Tkinter?"信息。 IDLE'无处可寻。


说明书中没有的是当我下载
时我应该在哪个目录中?我应该把.bz2放在哪里?文件?什么目录运行

make文件?目前我正在研究Windows机器,危及我的理智还剩下什么。


我正在使用Linspire,所以Debian目录可能是那些

将让我启动并运行的目录。除非有特定的知识,否则即使是一些好的猜测也会受到赞赏。



没什么特别的,只需阅读configure --help即可。会帮助你。你需要Tcl / Tk +可能的devel-packages,所以找到了header-files。我是

不是所需版本的专家,但应该告诉你

某处。


但是我怀疑你的

发行版已经没有python2.5了 - 特别是如果它是基于debian的。例如Ubuntu的默认值为2.5,即



Diez





Paul Boddie写道:


这里有一页可能告诉你你已经知道的东西:

< a rel =nofollowhref =http://wiki.python.org/moin/BeginnersGuide/Downloadtarget =_ blank> http://wiki.python.org/moin/BeginnersGuide/Download



谢谢!它说我需要Python(我已经拥有)和Python-devel

包,听起来它可能包括Tkinter和IDLE。现在如果只有我知道在哪里获得Python-devel包......


I went to Python.org, DL''d Python 2.5 source code per the usual
inadequate instructions and ran the make files successfully (sort of).
Python 2.5 works fine. But "from Tkinter import *" gets a "What''s
Tkinter?" message. IDLE''s no where to be found.

What''s not in the instructions is what directory should I be in when I
download? Where should I put the ".bz2" file? What dir for running the
make files? At present I''m working on a Windows machine, endangering
what''s left of my sanity.

I''m using Linspire, so Debian directories are probably the ones that
will get me up and running. Barring specific knowledge, even some good
guesses would be appreciated.

解决方案

On 17 Feb, 20:38, MartinRineh...@gmail.com wrote:

I went to Python.org, DL''d Python 2.5 source code per the usual
inadequate instructions and ran the make files successfully (sort of).
Python 2.5 works fine. But "from Tkinter import *" gets a "What''s
Tkinter?" message. IDLE''s no where to be found.

It could be that you don''t have the Tcl/Tk libraries installed, or
perhaps the header files for Tcl/Tk aren''t installed. If so, Python
wouldn''t detect them when being configured itself, and then you
probably wouldn''t have the Tkinter extension installed.

What''s not in the instructions is what directory should I be in when I
download? Where should I put the ".bz2" file? What dir for running the
make files? At present I''m working on a Windows machine, endangering
what''s left of my sanity.

I''m using Linspire, so Debian directories are probably the ones that
will get me up and running. Barring specific knowledge, even some good
guesses would be appreciated.

Here''s one page which probably tells you stuff you already know:

http://wiki.python.org/moin/BeginnersGuide/Download

On Ubuntu, which is Debian-based, the python-tk package should make
Tkinter available, so you could look for that in your repositories. As
for building from source, you can put the .bz2 file anywhere, and
unpack it anywhere that isn''t going to make a mess for you to clean up
later. For example, you could download the Python .bz2 file into a
"downloads" directory residing in your home directory, then you could
do this:

mkdir software
cd software
tar jxf ~/downloads/Python-2.5.1.tar.bz2
cd Python-2.5.1
../configure
make

You can then do a "make install" with the right privileges.

Paul


Ma************@gmail.com schrieb:

I went to Python.org, DL''d Python 2.5 source code per the usual
inadequate instructions and ran the make files successfully (sort of).
Python 2.5 works fine. But "from Tkinter import *" gets a "What''s
Tkinter?" message. IDLE''s no where to be found.

What''s not in the instructions is what directory should I be in when I
download? Where should I put the ".bz2" file? What dir for running the
make files? At present I''m working on a Windows machine, endangering
what''s left of my sanity.

I''m using Linspire, so Debian directories are probably the ones that
will get me up and running. Barring specific knowledge, even some good
guesses would be appreciated.

Nothing special, just reading the "configure --help" will help you. You
need Tcl/Tk + possible devel-packages so the header-files are found. I''m
not an expert on the required versions, but that should be told you
somewhere.

But I doubt that there isn''t a python2.5 already available for your
distro - especially if it''s debian based. Ubuntu for example has 2.5 as
default.

Diez




Paul Boddie wrote:

Here''s one page which probably tells you stuff you already know:

http://wiki.python.org/moin/BeginnersGuide/Download

Thank you! It says I need Python (which I''ve got) and the Python-devel
package, which sounds like it might include Tkinter and IDLE. Now if
only I knew where to get the Python-devel package ...


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

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