Compile errors trying to install WebRTCVAD module - python

I'm trying to create an app that uses the WebRTC VAD code.
I have found this: https://pypi.python.org/pypi/webrtcvad
The issue is that I cannot get it to work.
I extract the content into a folder but when It ry to run something it complains that _webrtcvad module is missing.
After a little research I tried to install the webRTC VAD module through pip. When doing this inside the folder I extracted into I get this:
When trying in another directory this happens:
How do I get this to work?

The problem was a bug in my webrtcvad's setup.py that caused it to use the wrong flags when compiling for Windows: it was using -DWEBRTC_POSIX instead of -DWIN32.
The fixed version has been pushed to pypi as version 2.0.9. I've confirmed that pip install webrtcvad works correctly on Windows 10.

Related

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.

ANTLR3 python runtime not detected

I want to use fstpso package in python which needs ANTLR3 python runtime.
I downloaded antlr_python_runtime-3.1.3.tar.gz from http://www.antlr3.org/download/Python/ and ran the command sudo python setup.py install. The output of the command was
Installed /path/to/python/packages/antlr_python_runtime-3.1.3-py2.7.egg
But after this when I try to import fstpso module in python, it throws the error
The ANTLR3 python runtime was not detected; pyfuzzy cannot import FST-PSO's FLC files
I am using python 2.7.12 on linux.
Is there something I did wrong? Or I have to update any PATH in the environment?
Thanks for your help!!
I'm fst-pso main developer. In the last days I reimplemented the Sugeno reasoner from scratch, to finally remove the pufuzzy/ANTL3 dependency. I just uploaded the new package on PyPI.
Now you can pip install the new version of fst-pso (v 1.4.0); please let me know if that works correctly.

How to compile TeX file from Python

I'm trying to create a pdf file inside a python/django project. I'm using PyLatex, which helps, but it's generate_pdf method breaks when it calls pdflatex. I keep getting this error:
FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex'
I tried everything - os.system() ... subprocess. Any way I try, it can't find pdflatex. I'm running on Windows, but I need to be able to to do this within the web-app anyway.
Thanks for any help!
You just need to install pdflatex (and you will need to install on your server when you release your web-app). Instructions for installing on windows can be found in the top answer here.
Do you have "pdflatex" installed? As per this question, you may have to install "MiKTeX" and point os.system() at C:\Program Files\MiKTeX <MikTeX version>\miktex\bin to make it work.
Hope that helps.
Do you have texlive installed? If yes, then the issue is with the system path variable. If not already added, add it to the system path.
#
Updated answer:
I took the time and decided to replicate your issue. I too use windows.
I copied the basic example from Pylatex and tested it on my machine, I was able to replicate the same error as you despite having TexLive installed. To solve it I did the following steps:
Installed MikTex (I believe you have it installed).
Tried running it again but failed with the error missing package latexmk.
Using MikTex package manager, I installed the latexmk package.
Tried running but still failed, error missing perl.exe command.
I had to install perl to my windows, use the following links -- https://learn.perl.org/installing/windows.html
When I tried again, it compiled successfully.
The issue was not having the package latexmk for MikTex and perl.exe of which you should have posted as part of the error logs. Try that and let me know if successful.

How to install mesos.native python module in Mac OS and Ubuntu

I would like to write and run a Mesos framework with Python, so I need mesos.native module.
On Ubuntu:
I can build mesos from source code. I tried to easy_install all the generated egg files but none of them made it possible for Python to import mesos.native.
I also tried to download the egg from http://downloads.mesosphere.io/master/ubuntu/14.04/mesos-0.20.1-py2.7-linux-x86_64.egg and easy_install it, which didn't work as well.
On Max OS:
Got some problem building the mesos source code because of the issue. So I am wondering whether there is an easy way to install the Python module without building the source code.
BTW, why don't they make the mesos.native pip-installable like mesos.interface?
Problem solved: https://github.com/RobinDong/mesos-python-examples/blob/master/calculate_pi/pi_run
I just need to set PYTHONPATH as that in the file and run python. Mesos.native can be successfully loaded.

Not able to build syntaxNet source?

I did everything given in their documentation but I'm getting this error again and again....I tried googling and finding if anyone got the same error but nopes, didn't work out. Heres the command --
bazel test --linkopt=-headerpad_max_install_names \
syntaxnet/... util/utf8/...
And heres the error -
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package 'external': Extension file '#org_tensorflow//tensorflow:tensorflow.bzl' may not be loaded from a WORKSPACE file since the extension file is located in an external repository.
INFO: Elapsed time: 0.052s
ERROR: Couldn't start the build. Unable to run test
here is a very useful script for installation on ubuntu-14.04
https://github.com/JoshData/models/blob/b72274d38f169f77e6a15e54834f463f627dc82a/syntaxnet/build/ubuntu-14.04_x64.sh
Finally solved it, it was related to the bazel version.
I had installed it before, so the version was 0.1.5. But in the docs, its written supported ones are 0.2 - 0.2.2b. I tried to upgrade it using brew but it didn't work.
So I tried to directly install it using the 0.2.2b installer and it worked :)

Categories