Flask server cannot start due to the lack of libgcc - python

I have created flask server for my app, which I want to run on raspbian, on raspberry pi. When trying to start with flask run I've got info that libgcc_s.so.1 must be installed for pthread_cancel to work Aborted.
It looks like server has been started, but just after that it has been immediately stopped.
Tryed already to install libgcc-8-dev via apt-get install but no success.
Also found that library can be downloaded from here: https://packages.debian.org/cgi-bin/search_contents.pl?word=libgcc_s.so.1&searchmode=searchfiles&case=insensitive&version=stable&arch=i386
but I have no idea which one should I pick and how to install it properly (where to place it and how to link it)?

If you using something like openCV, then try to find out its headless version.
For me that problem was coming due to openCV. Then I install its headless version and it works fine.
Example:- sudo pip3 install opencv-python-headless

Related

Could not locate nacl lib, searched for libsodium

I am trying to create project using python, flask and pycharm. While I was deploying the code using "flask deploy" command, I got "OSError: Could not locate nacl lib, searched for libsodium" issue. I could not solve the issue since I am new to python, flask and pycharm.
Need help.
I solved this issue by running
sudo apt-get install python3-nacl

Connect Python Backend on Windows with Ikea Tradfri

I'm trying to connect my python Backend with Ikeas's Tradfri to control it from my own app.
I found that for this communication I need DTLSSocket and libcoap, but according to this repo here (https://github.com/ggravlingen/pytradfri/issues/97) there are some major problems installing these libs on windows.
I tried it myself and it's still not working. Installing DTLSSocket on Windows results in:
ERROR: Failed building wheel for DTLSSocket
Of course I could use a VM or the WSL service to build a linux environment, but that's actually not what I want.
Is anyone of you aware of another solution how to connect to the tradfri gateway or knows how to install the required libs on Windows?
Thanks!
pip install conda
Then try again.

How can I make this script run

I found this script (tutorial) on GitHub (https://github.com/amyoshino/Dash_Tutorial_Series/blob/master/ex4.py) and I am trying to run in my local machine.
Unfortunately I am having and Error
I would really appreciate if anyone can help me to run this script.
Perhaps this is something easy but I am new in coding.
Thank you!
You probably just need to pip install the dash-core-components library!
Take a look at the Dash Installation documentation. It currently recommends running these commands:
pip install dash==0.38.0 # The core dash backend
pip install dash-html-components==0.13.5 # HTML components
pip install dash-core-components==0.43.1 # Supercharged components
pip install dash-table==3.5.0 # Interactive DataTable component (new!)
pip install dash-daq==0.1.0 # DAQ components (newly open-sourced!)
For more info on using pip to install Python packages, see: Installing Packages.
If you have run those commands, and Flask still throws that error, you may be having a path/environment issue, and should provide more info in your question about your Python setup.
Also, just to give you a sense of how to interpret this error message:
It's often easiest to start at the bottom and work your way up.
Here, the bottommost message is a FileNotFound error.
The program is looking for the file in your Python37/lib/site-packages folder. That tells you it's looking for a Python package. That is the directory to which Python packages get installed when you use a tool like pip.

How to install packages on networked computer

I'm using an Ipython2.7 notebook to run some code. Recently discovered that all my data was corrupted and I need to do it all again (meaning I am very very behind schedule) I figured I could half the time required if I could run it on a second computer. So I've gone into a uni computer cluster where the computers have python 2.7 installed. I can open the notebook, but it won't run as the first line is
import mlpy.wavelet
And it gives me an import error. I've tried downloading and installing it from sourceforge, but it seems to install it to the a Q drive, which I don't have access to. I am completely lost on what to do here, I can't even remember how I first installed it on my laptop. I have a feeling I pip installed it but I have no clue how to do this on a uni comp.
Any rapid responses would be greatly appreciated
You can use pip to install packages in your user's home directory.
Run pip install --user mply to install mply and your other dependencies.
See this answer for reference.

ZeroMQ rrclient-broker not working

I am trying to run the Python and Node.JS examples from https://github.com/imatix/zguide for the client-broker-worker architecture (rrclient, rrworker, rrbroker).
I can confirm that the Python implementation works fine, and the Node.JS implementation works fine, but when I try to combine the Node.JS rrclient with the Python rrbroker, the whole thing crashes and I get the following error:
Python quit unexpectedly while using the libzmq.3.dylib plug-in.
And the broker has the following error:
Assertion failed: (prefetched_msg.flags () & msg_t::identity) == 0 (router.cpp:276)
Abort trap: 6
Seems like Node.JS has issues connecting to Python. This seems to also come up with the basic REQ/REP architecture as well, not just client-broker-worker.
Seems like re-installing pyzmq seems to fix the problem...
sudo pip uninstall pyzmq
sudo pip install pyzmq
Whew, cheers!

Categories