Problem with google assistant on RaspberryPi - raspberry-pi3

When trying to run "googlesamples-assistant-pushtotalk" on my Raspberry I get this error.
Anyone know how to fix this?
ImportError: /home/pi/env/lib/python3.7/site-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: __atomic_exchange_8

I had the same issue with the google cloud vision library. This fixed it for me:
pip3 install 'grpcio==1.23.0' --force-reinstall

Another work-around is to add:
export LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1.2.0
Or whatever libatomic version you have.
e.g.:
export LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1.2.0
python3 some_script_using_grpcio.py

Related

Cannot import GLPK in Anaconda

I searched a lot an answer to my problem but wasn't able to find a fix.
I'm running anaconda.
I installed glpk with from conda-forge with the command:
conda install -c conda-forge glpk
The installation worked fine but then in my notebook, I've got an error message when I try to import the module :
ModuleNotFoundError: No module named 'glpk'
I had no problem to install and import other packages.
Any ideas?
Thank you very much in advance
The files installed by
conda install -c conda-forge glpk
can be found at https://anaconda.org/conda-forge/glpk/files. Looking at the archives only the GLPK C library is installed and no Python binding or package.
One of the packages that can call the GLPK library from Python is Pulp (https://anaconda.org/conda-forge/pulp).
I'm conda/windows user. I never could import it directly, but based on this SO answer I could make work a library that consume it (pypsa)
Basically, download the library (is in sourceforge) and add it to windows system path
Hope this help to somebody googling this issue. Bests

import tensorflow SyntaxError: invalid syntax

Using Virtualenv on Mac I have encountered the showing SyntaxError when I
import tensorflow
I tried many times uninstall but now working... please help me!
Tensorflow is not supported on Python 3.7. You'll need to use python3.6 or earlier.
async which was fine as a variable name in earlier versions of Python, is a keyword in Python 3.7. This is why it is failing to import.

win32 folder not found after "easy_install pywin32"

ImportError: No module named win32api this is the error i am getting. and looking at other posts i know that pywin32 is what missing from my virtualenv.
i tried easy_install pywin32.. but it didnt install the "win32" folder and win32api is part if win32 and i still get importError error.
i dont want to isntall the .exe (pywin32-219.win32-py2.7 fixes) which as mentioned in other posts since i will be making changes to the source and running it though automation hooks.
i am using python 2.7.6 version
easy_install "http://sourceforge.net/projects/pywin32/files/pywin32/Build 219/pywin32-219.win32-py2.7.exe solved the problem. Thanks

httpie gives me an error on macosx 'HTTPConnection'

I'm working on macosx and I try to use httpie (with Symfony2 and FOSRestBundle).
I follow different tutorial on how to install httpie.
When I try to launch with: http httpie.org
I received the following error :
http: error: AttributeError: 'HTTPConnection' object has no attribute '_tunnel_host'
I can't find anything on Google.
Do I have to configure something special or do I have to install another thing ?
Thanks !
It looks like a bug. I'd try to update/reinstall HTTPie (pip install --force-reinstall --upgrade httpie), and fill a bug report if it doesn't help.

How to install Scrapy on Mac OS X 10.7 ? (lxml error)

I'm a total newbie concerning Python and I have trouble installing Scrapy on Mac OS X 10.7. I've tried a lot of different things, but in summary, when I run:
scrapy startproject tutorial
I've got these errors :
ImportError: dlopen(/Library/Python/2.7/site-packages/lxml/etree.so, 2): Symbol not found: ___xmlStructuredErrorContext
Referenced from: /Library/Python/2.7/site-packages/lxml/etree.so
Expected in: flat namespace
in /Library/Python/2.7/site-packages/lxml/etree.so
After a lot of googling, I've followed this post and tried:
python setup.py build --static-deps --libxml2-version=2.7.8 && pip install lxml
but it tells me:
RuntimeError: ERROR: Trying to build without Cython, but pre-generated 'src/lxml/lxml.etree.c' is not available (pass --without-cython to ignore this error).
And if I run the same command with the —without-cython option, I get:
error: command 'llvm-gcc-4.2' failed with exit status 1
(though I've installed XCode command line tools)
Thanks in advance for your help !
(fyi, I am using MacPorts and pip install…)
You mention Macports at the end and also pip. I think you are mixing up packaging and installation methods.
The first import error should not be seen using a macports python as it puts its libraries under /opt/
As you have started on macports I would use the easy way
port install py27-scrapy
This will install all the needed packages (including python and lxml) to get scrapyto work.
To run scrapy you would need to use the macports python in /opt/local/bin/python2.7. This can be set as the default python if /opt/local/bin is on your path and you run port select to choose this as the python found. The scrapy executable script is /opt/local/bin/scrapy-2.7 Version numbers are used because you can have multiple versions of python working at once.

Resources