Where does ActivePython install pyqt4?
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 开发者_如何学JAVAsure 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!
Type this command to see where PyQt is installed:
pypm files --full-path pyqt4
By default, PyPM installs packages into your %APPDATA%\Python
directory. If you want to install globally into C:\Python32
use the -g
option (like: pypm -g install pyqt4
)
How do I make sure that script is able to fing the PYQT4 files necessary to run
Are you sure that you are invoking Python 3.2? Try running pypm -g install pyqt4
if all else fails.
精彩评论