0

机器:Red Hat Enterprise Linux Server 6.3 版(圣地亚哥)

我正在尝试PyQt4为 python安装。从 sourceforge2.6.6下载它的源代码。

我会使用以下命令安装它。

python configure.py
make && make install

但我的问题是我没有 root 访问权限。如何以非 root 用户身份安装 PyQt4?

4

1 回答 1

1

如果你输入python configure.py --help,你会得到几个选项:

...
  Installation:
    -b DIR, --bindir=DIR
                        where pyuic4, pyrcc4 and pylupdate4 will be installed
                        [default: /usr/bin]
    -d DIR, --destdir=DIR
                        where the PyQt4 Python package will be installed
                        [default: /usr/lib/python2.7/dist-packages]
    -p DIR, --plugin-destdir=DIR
                        where any plugins will be installed [default:
                        QTDIR/plugins]
    --no-sip-files      disable the installation of the .sip files [default:
                        enabled]
    -v DIR, --sipdir=DIR
                        where the PyQt4 .sip files will be installed [default:
                        /usr/share/sip]
...

运行时使用-b-d和选项指定您具有写入权限的目标目录。-p-vconfigure.py

于 2013-08-31T22:35:08.840 回答