我使用的是IPython笔记本电脑,我想让qt控制台也能正常运行。但我在Ubuntu 10.10上使用Python 2.7 (不是默认安装)我不太明白如何将Pyqt安装到这个替代的Python,我已经将其安装到默认的Python 2.6,但我如何才能将其安装到Python2.7?其他软件包与easy_install2.7一起安装,但这不起作用。我看到的所有指南(包括这里的SO)都没有解决安装到非默认Python版本的问题?
我使用configure.py和make and make install安装了SIP,但我的Configure.py在pyqt上失败了,原因是:
tom@tom-Sate
我使用pip和easy_install。
我收到了一条错误消息:
Downloading/unpacking psycopg2
Running setup.py egg_info for package psycopg2
error: invalid Python installation: unable to open /usr/include/python2.6/pyconfig.h (No such file or directory)
Complete output from command python setup.py egg_info:
running egg_info
从我所读到的所有东西中,我得到的印象是,从源头(相对地说)构建在Cygwin内部是相当容易的。但是,当我和gcc一起安装基本包并试图从源代码构建Python2.7.8时,我从运行./configure中得到了以下错误
checking whether we are cross compiling... configure: error: in `/cygdrive/h/Python-2.7.8':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host
我无法用pip安装gpg:
# pip install gpg
Collecting gpg
Downloading
Complete output from command python setup.py egg_info:
Could not find gpgme-config. Please install the libgpgme development package.
----------------------------------------
Command "python setup.py egg_info" failed with error c
我正在尝试构建色调,但到目前为止还没有太大的成功。我收到以下错误消息:
--- Building egg for MySQL-python-1.2.3c1
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 62, in
run_setu
我正在Ubuntu11.04(64位)中安装Acire和Python片段。
我已经成功地安装了Acire,但是我无法安装python包。这两个PPA都添加到了我的源代码列表中,但是当我运行sudo apt-get update时,我得到了错误:
W: Failed to fetch http://ppa.launchpad.net/python-snippets-drivers/python-snippets-daily/ubuntu/dists/natty/main/binary-amd64/Packages 404 Not Found
我应该如何安装python代码片段?
我的任务是创建两个存储库。其中一个有一个简单的python脚本
另一个是一个烧瓶应用程序,它应该使用第一个脚本并在json中返回结果。
所以这两个项目都是这样的
main.py
import random
def isPrime(n):
# Corner case
if n <= 1:
return False
# check from 2 to n-1
for i in range(2, n):
if n % i == 0:
return False
return True
#