How can I get iwlib for fedora 37? - python

I'm trying to use the Wlan widget for my Qtile bar, so I need the iwlib but I can't find it on the dnf.
I tried to install with
pip install iwlib
getting this error message
iwlib/__pycache__/_cffi__x89ce3654xfa7611d.c:265:10: error fatal: iwlib.h: No such file or directory
265 | #include <iwlib.h>
could somebody tellme which package provides Fedora 37 with that header?
and if ther is something extra a need to do to finally get my qtile Wlan widget working
even an alternative would be good
Thanks.

Related

pyzabbix Zabbix sender

I am looking to send a few items to zabbix using Zabbix-Sender function of pyzabbix. As a test I am running the below code -
from pyzabbix import ZabbixMetric, ZabbixSender, ZabbixResponse
metrics = []
m= ZabbixMetric('mme01', 'TEST', 20)
metrics.append(m)
ZabbixSender('10.46.224.5').send(metrics)
I made this snippet after reading the document - https://py-zabbix.readthedocs.io/en/latest/sender.html
When I run the snippet I get the error -
AttributeError: 'ConnectionRefusedError' object has no attribute 'msg'
I have verified IP connectivity
Can Anyone help ?
there is a mess in modules names.
it seems you call 'other' pyzabbix module who has not needed methods.
first, remove all zabbix-related modules:
pip list | grep zabbix; pip uninstall ...
and then install pyzabbix:
pip install py-zabbix.
this should help.
UPDATED:
I dug deeper and figured out that the AttributeError: 'ConnectionRefusedError' object has no attribute 'msg' exception caused by old module version bug, which has been fixed here. update it with pip or manually.
new bug I have faced is [Errno 8] nodename nor servname provided, or not known caused by socket lib and can be fixed pointing to zabbix server/proxy IP address instead of DNS name
I decided to bypass the module - pyzabbix and decided to use the raw zabbix sender utility. Works great.
For other folks my solution relies on a file with values that need to be sent to zabbix.
Sample file -
"mme01" TEST 1544729668 44
The use the utility -
/opt/zabbix-proxy/bin/zabbix_sender -vv -z 10.43.X.X -T -i mme_file.txt
Replace with path of your zabbix_sender and the zabbix server IP.
I had the same issue on some machines of mine. At that time I refactored my code to use zabbix_sender and it worked great.
After some time I found out the issue was related to pip repository corruption. I ended up reinstalling all the packages with this option:
pip install --ignore-installed <package>
apparently the issue was fixed, but I still have no idea why it occurred on some manchines and not in anothers.

Error installing/compiling grpc on Ubuntu

I have protobuf compiler version 3.0 and need to install grpc and grpc python plugin. Following the tutorial, I added deb http://http.debian.net/debian jessie-backports main to my sources.list file and did sudo apt-get update and sudo apt-get install libgrpc-dev which returned
Package libgrpc-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libgrpc-dev' has no installation candidate
So, I decided to compile it from source as mentioned in INSTALL notes and did:
$ git clone https://github.com/grpc/grpc.git
$ cd grpc
$ git submodule update --init
$ make
$ [sudo] make install
However, on the make step, I get
[MAKE] Generating cache.mk
make: Circular /home/vagrant/grpc2/grpc/libs/opt/libboringssl.a <- /home/vagrant/grpc2/grpc/libs/opt/libboringssl.a dependency dropped.
[C] Compiling third_party/boringssl/crypto/bio/connect.c
third_party/boringssl/crypto/bio/connect.c: In function 'split_host_and_port':
third_party/boringssl/crypto/bio/connect.c:127:17: error: declaration of 'close' shadows a global declaration [-Werror=shadow]
cc1: all warnings being treated as errors
make: *** [/home/vagrant/grpc2/grpc/objs/opt/third_party/boringssl/crypto/bio/connect.o] Error 1
On switching to the release-0_11 branch, running make results in
[HOSTCXX] Compiling src/compiler/csharp_generator.cc
src/compiler/csharp_generator.cc:47:43: error: 'google::protobuf::compiler::csharp::GetUmbrellaClassName' has not been declared
src/compiler/csharp_generator.cc: In function 'void grpc_csharp_generator::{anonymous}::GenerateServiceDescriptorProperty(grpc::protobuf::io::Printer*, const ServiceDescriptor*)':
src/compiler/csharp_generator.cc:237:62: error: 'GetUmbrellaClassName' was not declared in this scope
make: *** [/home/vagrant/grpc2/grpc/objs/opt/src/compiler/csharp_generator.o] Error 1
I can't figure out how to install this. Any help would be appreciated.
For me the issue got fixed after i made change in the file as:
diff --git a/src/compiler/csharp_generator.cc
b/src/compiler/csharp_generator.cc
index 7b497df..5a8746d 100644
--- a/src/compiler/csharp_generator.cc
+++ b/src/compiler/csharp_generator.cc
## -44,7 +44,7 ##
using google::protobuf::compiler::csharp::GetFileNamespace;
using google::protobuf::compiler::csharp::GetClassName;
-using google::protobuf::compiler::csharp::GetUmbrellaClassName;
+using google::protobuf::compiler::csharp::GetReflectionClassName;
using grpc::protobuf::FileDescriptor;
using grpc::protobuf::Descriptor;
using grpc::protobuf::ServiceDescriptor;
## -234,7 +234,7 ## void GenerateServiceDescriptorProperty(Printer* out, const ServiceDescriptor *se
out->Print("public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor\n");
out->Print("{\n");
out->Print(" get { return $umbrella$.Descriptor.Services[$index$]; }\n",
- "umbrella", GetUmbrellaClassName(service->file()), "index",
+ "umbrella", GetReflectionClassName(service->file()), "index",
index.str());
out->Print("}\n");
out->Print("\n");
More specifically, please open the file src/compiler/csharp_generator.cc and replace all references of GetUmbrellaClassName by GetReflectionClassName
Working backwards:
for release-0_11: it looks like you're trying to compile against the most recent protobuf. Since we're both in development right now there's occasional breakage - but grpc does track the version of protobuf it's tested against in third_party/protobuf. Try checking out and installing that version. I filed https://github.com/grpc/grpc/issues/4697 to update to the latest protobuf 3.0 version.
for master from github: which compiler and OS are you using? I recently checked in the boringssl integration work, so it's fresh, and not nearly as battle-tested. I'd like to get it battle-tested. That said, if you do a 'make EMBED_OPENSSL=false' then things should work out for you.
for the debian package problem: I'm not sure what's going on. I'm happy to try and spin up a VM with your OS and repro if you can let me know which OS it is.

PyQt5 error during "python3 configure.py": fatal error: 'qgeolocation.h' file not found

MAC OSX 10.9, Python 3.5, sip-4.17, PyQt-gpl-5.5.1, Qt5.5.1
Hi,
trying to build PyQt on my system I did the following steps:
download/install Qt5.5.1 libraries
download/unpack SIP
download/unpack PyQt
install SIP:
python3 configure.py -d /Library/Python/3.5/site-packages --arch x86_64
make
sudo make install
tried to install PyQt:
python3 configure.py -d /Library/Python/3.5/site-packages
--qmake /.../Qt5.5.1/5.5/clang_64/bin/qmake
Configuration stopped with:
/Users/werner/OpenSource/PyQt/sip/QtPositioning/qgeolocation.sip:28:10:
fatal >error: 'qgeolocation.h' file not found
#include <qgeolocation.h>
^
1 error generated.
make[1]: *** [sipQtPositioningcmodule.o] Error 1
make: *** [sub-QtPositioning-make_first-ordered] Error 2
I tried to finish installation doing
make
sudo make install
anyway. But the installation doesn't seem to be complete (e.g. uic, pyuic5 are missing). Here is what my installation directory looks like:
>ls /Library/Python/3.5/site-packages/PyQt5
QtBluetooth.so QtSensors.so
QtCore.so QtSerialPort.so
QtDBus.so QtSql.so
QtDesigner.so QtSvg.so
QtGui.so QtTest.so
QtHelp.so QtWebKit.so
QtMacExtras.so QtWebKitWidgets.so
QtMultimedia.so QtWidgets.so
QtMultimediaWidgets.so QtXml.so
QtNetwork.so QtXmlPatterns.so
QtOpenGL.so _QOpenGLFunctions_2_0.so
QtPrintSupport.so _QOpenGLFunctions_2_1.so
QtQml.so _QOpenGLFunctions_4_1_Core.so
QtQuick.so
I couldn't find any useful information when searching for other discussions, so I hope someone can give me a hint on what I'm (maybe stupidly) doing wrong. Thank you for taking the time to read this.
If you don't need this module, the better way to solve that is disabling it on configure.
python configure.py --disable=QtPositioning
Just yesterday, I also met such a problem. And this is what I do to solve it:
Create a header file qgeolocation.h in /PyQt-gpl-5.5.1/QtPositioning, and copy the content into it from this website. Then I go sudo make and sudo make install successfully.
Though I do not know whether it is right to solve this problem, fortunately, I installed the PyQt and entered eric6. Hope you make successfully, too.
Adding the location.h header file for me on OSX 10.11.1.
I had the problem in both PyQt-gpl-5.5.1 and PyQt-gpl-5.5.2, but after adding the
file, was able to build.
The way of creating a qgeolocation.h in /PyQt-gpl-5.5.1/QtPositioning worked for me. The QtPositioning.so was created.
You can also take the header file from your qt source folder (you have installed the source files together with binaries, right?), it is located here:
/Src/qtlocation/src/positioning/qgeolocation.h
and then just copy it into:
/PyQt-gpl-X.X.X/QtPositioning/qgeolocation.h
as follows. It should solve the problem in 99.9% cases.

Does anyone know how to compile Megahal on Ubuntu?

I have been trying to compile megahal for a few hours now and i dont seem to be getting anywhere. Has anyone had success with this?
http://megahal.alioth.debian.org/
I keep getting an error that says :
inlined from ‘load_personality.constprop’ at megahal.c:3283:8,
inlined from ‘change_personality.constprop’ at megahal.c:3332:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:293:2: warning: call to ‘__fread_chk_warn’ declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer
return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream);
^
cc1: some warnings being treated as errors
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Makefile:44: recipe for target 'pythonmodule' failed
make: *** [pythonmodule] Error 1
I have installed python via sudo apt-get and i have been over every thread that talks about "'x86_64-linux-gnu-gcc' but I have found no solution
You are getting these errors just because you don't have the python development headers installed. You can install it using following command
sudo apt-get install python-dev ( for python 2.x )
sudo apt-get install python3-dev ( for python 3 )
you need the python developer module "python-dev".this will help you
error: command 'gcc' failed with exit status 1 while installing eventlet
after upgrading to vivid 15.04 on ubuntu i couldn't compile the module anymore so i tried something else. Since in the main folder there is a directory named Megahal with a Makefile in it, i tried to compile from there. First you need to go to that directory.
cd /home/user/Downloads/megahal-9.1.1/Megahal/
you need to go where you unzipped the archive and there you can read the README file and start compiling.
perl Makefile.PL
i copied the missing files i was able to find to that folder and from there
make
make test
but this didn't work for me and afther that
make install
i had to do
sudo make install
and that is all. unfortunately for me i have a problem with perl i think.
I keep getting this error from the module "PL_thr_key" after i load it to the eggdrop. The eggdrop works normally except for the module. No module, no AI and no fun :(

Loading matplotlib on cygwin

To load matplotlib on cygwin, I have:
Loaded pre-requisites using cygwin 64-bit setup: pkg-config, freetype2, libfreetype-devel, libpng-devel, gtk2.0, libgtk2.0-devel
Downloaded the matplotlib tar file (http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.3.1/matplotlib-1.3.1.tar.gz) and changed the source code to get around the "_tri" error as advised here:
matplotlib error while installing pyspeckit
Then built and installed matplotlib:
$ python setup.py build
$ python setup.py install
And am down to what looks like a matplotlib backend error. Does anyone know how to get around this:
/usr/lib/python2.7/site-packages/gtk-2.0/gtk/init.py:57: GtkWarning: could not open display
...
cursors.MOVE : gdk.Cursor(gdk.FLEUR),
et n RuntimeError: could not create GdkCursor object
EDIT: I just finally got it and matplotlib is finally working on cygwin. To do this, I did:
From cygwin setup, loaded the X-Server tools:
xorg-server xinit
From cygwin setup, I also loaded these so that use telnet or ssh connections to run remote X clients:
inetutils openssh
I set my display:
DISPLAY=":0.0"
export DISPLAY
From the cygwin shell, I did:
$ startxwin
Then I ran my python scripts which use matplotlib in the X-window
I had an issue with "python setup.py build" not finding the ft2build.h which comes from the the freetype2 package. I installed the freetype2 development package and I can find it in /usr/include/freetype2/ft2build.h but the error is still there.
After digging into the setupext.py at the function check_include_file(include_dirs, filename, package), I noticed that the package="freetype2" was not concatenated into to the search path. Hence it could not find "/usr/include/ft2build.h" when it should be "/usr/include/freetype2/ft2build.h
Fixing this line #134
if not has_include_file(include_dirs, "%s/%s"%(package,filename)):

Categories

Resources