我正在尝试安装pycairo。我下载了pycairo-1.10.0文件夹,并尝试按照说明进行操作。我在屏幕快照screenshot底部显示的位置安装了python3.5,但是在运行config时找不到它。

我正在运行OS X Yosemite 10.10.5。

安装步骤

$ ./waf --help

$ ./waf configure  ( use --prefix and --libdir if necessary, --prefix=/usr --libdir=/usr/lib64  for Fedora 64-bit)

$ ./waf build
$ ./waf install


采用

$ python3 ./waf ...
if you have python2 and python3 installed, and the default is python 2.

最佳答案

为什么不只使用点子呢?在pip documentation中可以解决您的问题。

在Linux,Mac OS X上:

python2   -m pip install SomePackage  # default Python 2
python2.7 -m pip install SomePackage  # specifically Python 2.7
python3   -m pip install SomePackage  # default Python 3
python3.4 -m pip install SomePackage  # specifically Python 3.4
python3.5 -m pip install SomePackage  # specifically Python 3.5


在Windows上:

py -2   -m pip install SomePackage  # default Python 2
py -2.7 -m pip install SomePackage  # specifically Python 2.7
py -3   -m pip install SomePackage  # default Python 3
py -3.4 -m pip install SomePackage  # specifically Python 3.4

关于python - 安装pycairo时找不到python3,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34567470/

10-11 07:29
查看更多