python ffvideo , 'libavutil/rational.h' file not found - python

I currently have a problem while installing an ffvideo (0.0.13) app to a django project. I use zc.buildout and simply get fatal error's while building:
'libavutil/rational.h' file not found
My System is running on OSX 10.10, I tried to install ffmpeg-dev via macport.
The lib is at /opt/local/include/libavutil/
Anyone got an idea or knows the problem?

install newer ffmpeg library, I'm personally using brew
ffvideo is quite old and not touch for the last few years, maybe look at the PyAV - which looks much better.

Related

When I tried to install sacrebleu, I got an installation error

Description
When I tried to install package sacrebleu, I got an error like this:
Installation Error
It said "System cannot find the specified file". However I have no idea how to solve it.
I have tried installing package mecab-python3. But it confuses me that it was successfully installed in Anaconda but got an error, "Microsoft Visual C++ 14.0 is required", in original python38 environment.
Whether the package mecab-python3 has been installed or not, I still got the same error and cannot install sacrebleu.
I also tried restarting my machine but it does not work.
Is there anyone could solve it? or I want to know if there is any alternative package I can use to calculate BLEU score.
Thanks Anyway!
My Environment
Windows 10
Python 3.8
pip 20.1.1
Anaconda3 v4.8.2
I'm the mecab-python3 maintainer. Sorry it's giving you trouble.
The README has a link to the C++ runtime pack you have to install on Windows, if you install that it should work.
I have heard reports of the package not working with Anaconda on Windows specifically, though it seems to work sometimes. If you have trouble please open an issue and I'll try to fix it. On the other hand, if you aren't processing Japanese there's no reason to import the module and that may be a bug in sacrebleu.
Ah, actually, I just saw your screenshot - didn't notice it before.
Versions before 1.0 don't support Windows. But to keep using the old dictionary, sacrebleu has to make some changes, so they don't support 1.0+ yet. I think they are working on it, see this issue.

How to solve ImportError: dlopen(): Symbol not found:.... Expected in: flat namespace

Can anyone help me solve this issue?
ImportError: dlopen(/Users/......./venv/lib/python3.6/site-packages/recordclass/mutabletuple.cpython-36m-darwin.so, 2): Symbol not found: __PyEval_GetBuiltinId
Referenced from: /Users/......./venv/lib/python3.6/site-packages/recordclass/mutabletuple.cpython-36m-darwin.so
Expected in: flat namespace
in /Users/......../venv/lib/python3.6/site-packages/recordclass/mutabletuple.cpython-36m-darwin.so
I'm using a Mac if that's of any relevance
I couldn't quite figure out what the issue was but I'm assuming __PyEval_GetBuiltinId was broken/uninstalled.
So all I did to fix this was pip uninstall recordclass and then pip install --no-cache-dir recordclass and it seemed to have worked
I encountered the same problem and found your question. I have an M1 MacBook, but I think we're encountering 2 problems.
At first, I had a similar error to yours:
ImportError> dlopen(): Library not found
What I did to fix this error was 'brew install ___' the library that was missing, in my case it was tesseract. After I brew installed it again I ran my script and got a new error. This time I had a
no suitable image found: imageXXX found but wrong architecture
So what I think may be happening is there is an underlying error with the compatibility between our M1 chips and the brew install-ed formulaes. I'm currently trying to find a solution. The first I'm going to try is resetting my installation from scratch and, if that doesn't work, look at alternatives. Ultimately I think what will solve the problem is installing from source like is described on the OpenCV website: https://docs.opencv.org/master/d0/db2/tutorial_macos_install.html.
Hope this helped!
EDIT
I just finished uninstalling Homebrew completely and the reinstalling it from scratch, both casks, formulae, EVERYTHING! And it seems to work. I got both Tensorflow and OpenCV to work (they both printed their versions and I ran a simple camera test on OpenCV)
This issue is well described here. I had the same issue with the NetCDF4 library in the macOS M1 chip.
In my case (NetCDF4#1.5.8) installing the library using brew and pip didn't solve the problem as the provided package wasn't compatible with the M1 chip.
The issue will solve as mentioned in their Github in NetCDF#1.6.0.
In such cases, I recommend:
First make sure that you install dependencies of the library (in this case recordclass) that you are using in your system in case you are using a virtual environment, not just in the environment.
Second check if the wheel of the library meets your machine requirements.

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.

Python install failed windows 8.1- Error 0x80240017: Failed to execute MSU package

I have windows 8.1 and tried installing: python-3.5.0rc3-amd64
I tried running as admin to no avail.
Here is the log of the failed install: http://pastebin.com/Y465P6zi.
Manually install the Universal C Runtime update from Microsoft:
https://support.microsoft.com/en-us/kb/2999226
and then re-attempt installation of Python 3.5.
I too had the same issue. Try installing Python 3.4.3. It worked for me.
You may try some older version. I had similar issues and I tried a lot to update but not succeed. Then I tried for python-3.4.3. It's works fine for me. There are not much different between 3.4.3 and 3.5.0.
Please update the window version from windows update(if you have blocked auto windows update).
This problem have nothing to do with product key.
Installing older version might help but, won't solve the purpose of installing the 3.5.X version
I had this problem because I was trying to install Python on a computer that had its Windows Updates downloaded, yet not yet installed and configured.
Solution: reboot your computer so that all Windows updates are installed and configured, then try again.
Download python-2.7.14 following link:
https://www.python.org/downloads/release/python-2714/
Install "python-2.7.14" and set PATH variable manual in windows.
Create a New folder in the root of windows drive -> windows ( for example C:\windows\ ) and name it "installer", it's done. install again. it worked for me.

Cannot find tk.h despite having the dev packages installed

I am trying to install wck. But I ran into the following error when running setup.py :
fatal error : tk.h : no such file or directory
But I already have all the -dev packages installed! I went on and installed tk-dev, tk8.5-dev and tk8.4-dev and the problem persists. I did a 'locate tk.h' and there was no tk.h anywhere in my system. Wherever this problem was reported, people were trying to get tcl.h too. So I did a sudo apt-get install tcl-dev and did a 'locate tcl.h'. Nothing! Where did all the header files go?
Your problem is, that WCKs setup.py and setuplib.py don't have a clue where to look with the layout on your system, so you will have to fix those to get it working.
I assume your using some variant of Debian Linux there, so maybe have a look at their guidelines for packaging Tcl/Tk.
Basically they recommend adding configure switches like:
--with-tcl=/usr/lib/tclX.Y
--with-tk=/usr/lib/tkX.Y
--with-tclincludes=/usr/include/tclX.Y
http://pkg-tcltk.alioth.debian.org/tcltk-policy.html/ap-debian_oddities.html
http://pkg-tcltk.alioth.debian.org/tcltk-policy.html/ch-tcltk.html
With that info, you might be able to get it to work by editing setup.py and simply adding a version of find_tk() that works for your system.

Categories