Tag Archives: 64bit

Installing PyQt4 in Windows + Python 3.6

As the title suggests, this article only applies to Python3.6 in Windows, and note that PyQt4, not PyQt5, will be installed. This is important because if you’ve ever used Python’s third party drawing libraries, Matplotlib and Seaborn, you’ve noticed that they both rely on PyQt4 (whatever PyQt5 does, it’s PyQt4, not PyQt5. If you have PyQt5 installed but don’t have PyQt4, you still can’t use them). In general, if you are using Anaconda3 as the Python interpreter, the Python version that contains PyQt4 can be viewed using conda list (the Python3.6 version comes with me). If, by some accident, PyQt4 is accidentally uninstalled, you use one of the two libraries mentioned above and it is “No module named PyQt4”, or “Pyqt4.gui, Pyqt4.core”, etc. There are several common ways to solve such problems online:
(1) Download The Windows Installers version of PyQt4 directly from the official website, namely the EXE file, and install it directly. Unfortunately, it looks like the official site has been revamped and I can’t find a ready version of Windows x 32 or x 64 for Python3.6 anyway.
(2) now the official website published the version of window after downloading is an uncompressed version, but not directly can be used, and need to re-make installation, more troublesome.
(3) a commonly used PIP or conda automatic installation does not reveal the existence of readily available resources for the Windows platform.
A very simple and efficient way to do this is to download it directly. WHL, which is available here (http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4), is a convenient way to choose between different Python versions, Windows 64bit or 32bit. After downloading, you can put the file into the Python installation directory, and then enter the CD into the directory under CMD or anaconda prompt. Enter the command, such as: PIP install pyqt4-4.11.4-cp36-cp36m-win_amd64. WHL , and wait for the completion of the installation. At this point, import seaborn as SNS or import matplotlib.pyplot as PLT can be executed normally.

How to make the import complete smoothly!

When you import an EXP, you may encounter constraints that prevent you from importing.
You can disable constraints to make the import complete!
When importing, I encountered the following problems:
Column 30 MOS
IMP-00019: row rejected due to ORACLE error 2291
IMP-00003: ORACLE error 2291 encountered
ORA-02291: integrity constraint (CMDB.CI_ELEMENT_LOCATION) violated – parent key not found
The processing steps are as follows:
SQL> create table cmdb.configuration_item_bak as select * from cmdb.configuration_item;
Table created.
SQL> alter table cmdb.configuration_item disable primary key;
alter table cmdb.configuration_item disable primary key
*
ERROR at line 1:
ORA-02297: cannot disable constraint (CMDB.PK_CONFIGURATION_ITEM) –
dependencies exist

SQL> Alter TABLE cmDB. configuration_item disable constraint PK_CONFIGURATION_ITEM;
alter table cmdb.configuration_item disable PK_CONFIGURATION_ITEM
*
ERROR at line 1:
ora-02297: cannot disable constraint (CMDB.PK_CONFIGURATION_ITEM) –
dependencies exist

SQL> Alter TABLE CMDB. Configuration_item disable constraint PK_CONFIGURATION_ITEM cascade;
Table altered.
SQL> alter table cmdb.configuration_item disable primary key;
Table altered.
SQL> Alter TABLE cmDB. configuration_item disable constraint PK_CONFIGURATION_ITEM;
Table altered.
 
I thought the import should be ok 🙂
imp/file=cmdb.dmp fromuser=cmdb touser=cmdb ignore=y
But the question remains?
Why is that?The original constraint error here was a violation of the constraint to import data in the file, regardless of whether the constraint on the table was disabled or not.
Just because the table already has the same data as the file, a constraint in the file was violated when importing it.
So you can complete the import by clearing the table data.
truncate table cmdb.configuration_item ;

then import:
-bask-3.00 $imp/file= CMdb.dmp Fromuser = CMDB Touser = CMDB ignore=y
Import: Release 11.2.0.2.0 – Production on Wed Aug 17 03:27:17 2011
Copyright (C) 1982, 2009, Oracle and/or its Affiliates. All rights Reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0-64bit Production
With the Partitioning option
Export file created by Export :V11.02.00 via conventional path
import done in UTF8 character set and AL16UTF16 NCHAR character set
import server USES AL32UTF8 character set (possible charset)
export client USES US7ASCII character set (possible charset conversion)
. It is important to import CMDB’s objects into CMDB
imported