ActivePython在哪里安装pyqt4?
我目前使用的是 Windows XP 计算机(32 位)。我是 Scribus 的新手,与其他昂贵的桌面出版程序相比,我更喜欢使用它。在 Scribus 中,我有一个想要运行的预写脚本。脚本的开头包含:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class DockDialog(QDockWidget):
我已经通过 ActivePython 安装了 Python 3.2(在尝试从 python.org 安装之后)。安装后,我打开一个 DOS 窗口并输入 pypm install pyqt4,我可以看出安装正确。然后,我尝试在 Scribus 中运行脚本并收到以下消息:
Traceback (most recent call last):
File "<string>", line 8, in ?
File "C:/Program Files/Scribus 1.3.3.14/share/scripts/Scribus-DockWidgets/DockWidgets.py", line 4, in ?
from PyQt4.QtCore import *
ImportError: No module named PyQt4.QtCore
然后,我尝试通过键入之前的内容来重新安装 PYQT4,并被告知 PYQT4 已通过以下方式安装:
skipping "pyqt4" already installed at "%APPDATA%\Python" (3.2)
在查看所有的 c:\Python32 后目录我找不到任何 PYQT 文件。它们安装在哪里?如何确保脚本能够找到运行所需的 PYQT4 文件?
我的 PATH 变量是:
C:\Python32\;C:\Python32\Scripts;
最终我想要帮助让 scribus 脚本正常工作。
感谢您的帮助!
I am currently using a Windows XP machine (32 bit). I am new to Scribus, and have enjoyed using it over the other expensive program for desktop publishing. In Scribus I have a prewritten script I would like to run. The beginning of the script contains:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class DockDialog(QDockWidget):
I have installed Python 3.2 via ActivePython (after trying to install from python.org). After the install I then opened a DOS window and typed pypm install pyqt4, which, as far as I could tell installed properly. I then tried to run the script in Scribus and received the following message:
Traceback (most recent call last):
File "<string>", line 8, in ?
File "C:/Program Files/Scribus 1.3.3.14/share/scripts/Scribus-DockWidgets/DockWidgets.py", line 4, in ?
from PyQt4.QtCore import *
ImportError: No module named PyQt4.QtCore
I then tried reinstalling PYQT4, by typing what I had before, and I was told that PYQT4 was already installed via:
skipping "pyqt4" already installed at "%APPDATA%\Python" (3.2)
After looking in c:\Python32 in all of the directories I can not find any PYQT files. Where were they installed? How do I make sure that script is able to fing the PYQT4 files necessary to run?
My PATH variable is:
C:\Python32\;C:\Python32\Scripts;
Ultimately I would like help in getting the scribus script to work.
Thank you for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
键入此命令可查看 PyQt 的安装位置:
默认情况下,PyPM 将软件包安装到您的
%APPDATA%\Python
目录中。如果您想全局安装到C:\Python32
中,请使用-g
选项(例如:pypm -g install pyqt4
)您确定正在调用 Python 3.2 吗?如果其他方法都失败,请尝试运行 pypm -g install pyqt4 。
Type this command to see where PyQt is installed:
By default, PyPM installs packages into your
%APPDATA%\Python
directory. If you want to install globally intoC:\Python32
use the-g
option (like:pypm -g install pyqt4
)Are you sure that you are invoking Python 3.2? Try running
pypm -g install pyqt4
if all else fails.