ImportError: No module named ldap (Windows XP) - python-ldap

I have installed Python 2.7.1 and python-ldap-2.4.8.win32-py2.7 module. Whenever I type
import ldap
it gives and error.......
ImportError: No module named ldap
Path is set properly, I have only one version of Python i.e. 2.7.1 I have installed python-ldap module properly.
then also I am facing this problem. why so?
Any help is very much appreciated.

Please provide more information to debug this problem.
Are you sure the python-ldap module was installed successfully? (I realize you said it was but if you tried to install it using pip, the install command completes with errors because it is missing some header files for the build)
The easiest way to install python-ldap on Windows is to download the binary from: http://pypi.python.org/pypi/python-ldap
Make sure you download the python-ldap version that corresponds to your installed python version.

Related

How to use QTermWidget with PyQt5?

I am trying to install https://github.com/lxqt/qtermwidget so that I can have a terminal widget to use with PyQt5. However, it does not seem to be possible to install without building myself, and when I try follow the instructions to build it myself, I get errors.
After doing cmake, I followed the instruction on qtermwidget's GitHub page to run sip-wheel inside the "pyqt" directory, but I get the error:
Querying qmake about your Qt installation...
sip-wheel: '12.11' is not a supported ABI version
What is the proper way to make "import QTermWidget" work inside python?
I got the same error when I used the sip-wheel to get qtermwidget Python binding. The problem is having different versions of PyQt and sip tools on the computer. I tested in a virtual machine with a clean version of Ubuntu, and I could build without problems. On my laptop, the solution was to create a virtual Python environment, install pyqt5, and sip tools again.

qml: Error: SSL Sockets are not supported on this platform

I'm currently trying to get this
WebSocket example working. I believe I get it rendering correctly but I get "qml: Error: SSL Sockets are not supported on this platform." When it tries to connect to the WebSocket. Any idea about what I can do to fix this?
I'm using Desktop Qt 5.15.2 MSVC2019 64bit
edit: The code I'm using is one of the built-in examples for Qt: qmlwebsocketclient
If your OS is windows you should install OpenSSL.
and also be sure that you were installed OpenSSL libraries
Windows doesn't install OpenSSL by default like Linux. I found this the best way of installing OpenSSL to solve the problem.
Make sure OpenSSL toolkit is installed through Qt. This can be done through the Qt Maintenance Tool.
Set the environment variables to that install.
-Add a new system variable named OPENSSL_CONF with the path to the openssl.cnf file. mine from a default install was C:\Qt\Tools\OpenSSL\Win_x64\openssl.cnf
-Add the openssl bin to the system variable Path. Mine from a default install was C:\Qt\Tools\OpenSSL\Win_x64\bin
You can check if the path variable has been set correctly by opening a CMD and printing the version with openssl version. This will print correctly even if the OPENSSL_CONF path is wrong, but if correct the error should go away inside Qt.

Using GraphicalEffects in PySide6

I am using PySide6 and am trying to use the GraphicalEffects module.
As per documentation here:
https://doc.qt.io/qt-6/qtgraphicaleffects5-index.html
I am doing:
import Qt5Compat.QtGraphicalEffects
The error I am getting:
"Qt5Compat.QtGraphicalEffects" is not installed
How do I install this module? I have PySide6.2.2.1 installed on my Linux machine.
Its a known issue when installing from pypi. It will be fixed in pyside 6.4.
You can also build from source and it will be added automatically if you installed it with Qt-online installer.
An alternative would be to copy the module from the root directory and include it in the development environment.
Here is a more detailed description: QT6.4 QML PYTHON module "Qt5Compat.GraphicalEffects" is not installed
Works with Pyside6 or PyQt6.

Meteor doesn't work in Windows 10

I downloaded the Meteor's official Download from here: Meteor 1.2.1
and the installer is just 1.2mb
Now, after running it: Nothing happens. No permission. Nothing. This page is shown:
And then when I hit Skip this step, this is shown:
Even after restarting, there is no .meteor folder in AppData\Local directory, and Meteor command is still not recognised.
Also, I think, how can a 1.2mbinstall something like Meteor which is like 53mb when installed via curl on OSX or Linux.
Are the Meteor fooling windows? I dont know why the installer doesn't work. The point is: How can it?
Downloaded file is installer not setup.
First install the meteor in your machine.
Then set it in environment variable.

Plone upgrade from Ubuntu 8.04 to Ubuntu 12.04

I'm having some difficulty upgrading my Plone install to 4.2.5.
The old Plone/zope install was running on Ubuntu 8.04. I upgraded the OS to 12.04, and reinstalled plone and zope.
I followed the instructions at: http://plone.org/documentation/manual/upgrade-guide/minor-version-upgrades for the upgrade.
The 12.04 install was successful, the trouble comes when I copy my old configs, and data over into the new install.
When I run bin/buildout after copying over, I get the message:
Error: Buildout now includes 'buildout-versions' (and part of the older 'buildout.dumppickedversions').
Remove the extension from your configuration and look at the 'show-picked-versions' option in buildout's documentation.
I tried removing the extensions, which allows bin/buildout to finish without error, however when I start zope, I get the following error:
File "/home/plone/Plone/buildout-cache/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/persistent/init.py", line 19, in
from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY
ImportError: /home/plone/Plone/buildout-cache/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/persistent/cPersistence.so: undefined symbol: PyUnicodeUCS2_AsEncodedString
Python comes in two Unicode flavours; narrow and wide, or UCS2 and UCS4, with wide builds allowing for more Unicode character support. Your compiled C extension is compiled with a wide Python but you are now using a narrow Python.
Your best bet is to remove the ZODB3 egg and have buildout recreate it. Delete the /home/plone/Plone/buildout-cache/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg directory altogether.
You probably have to do this for more eggs that have extensions.

Resources