Version of libjpeg while using other package - python-3.x

I would like to visualize weather data, which are under the format .grb2. Therefore I need the library pygrib for python. I've already install grib-api and pygrib, as explained on the installation notes of pygrib (http://jswhit.github.io/pygrib/docs/). I'm using python 3.5 installed with anaconda. I ran
brew install grib-api
pip install pygrib
However when I try to import pygrib in a python script I always get the same error message :
import pygrib
--> ImportError: dlopen(/Users/Marguerite/anaconda/lib/python3.5/sitepackages/pygrib.cpyton-35m-darwin.so, 2): Library not loaded: #rpath/libjpeg.9.dylib
Referenced from: /Users/Marguerite/anaconda/lib//libgrib_api.dylib
Reason: Incompatible library version: libgrib_api.dylib requires version 12.0.0 or later, but libjpeg.9.dylib provides version 11.0.0
I've tried several times to uninstall/reinstall jpeg libraries, or install libjpeg with macports, nothing seems to do the trick ... Also I can't find the library libjpeg when I run "conda list". It seems it is included into some other library (jpeg of libjpeg-turbo), but again updating those libraries didn't improve results.
I would appreciate really any help or thoughts !
Thanks,
Marguerite

Actually I found a solution. Libjpeg is updated with conda update jpeg, but not to the latest version.
The trick that worked for me is to install a bigger package, which automatically update libjpeg. Just run :
conda install -c conda-forge jasper
After that it worked fine for me :)

Related

How to install libdoc2testbench on Ubuntu

libdoc2testbench is a tool of Robot Framework which supports importing test results to imbus testbench. Due to Robot Framework documentation, it is to be installed by
pip install robotframework-libdoc2testbench
I want to install it on Ubuntu 18.04; there I get the error:
Could not find a version that satisfies the requirement robotframework-libdoc2testbench (from versions: )
No matching distribution found for robotframework-libdoc2testbench
Best regards
Gerhard
You are probably calling pip from Python 2.7.
Make sure you use Python 3, for example with:
python3 -m pip install robotframework-libdoc2testbench
EDIT: You can download the .wheel or source tar from pypi.org and install with pip pointing to it (and then if needed, download other required packages).
However the solution to your problem is the Python version. From the project page, we see it needs Python 3.7.

'xlrd' installed, but getting the error: "Missing optional dependency 'xlrd'..."

I'm using Python 3.7 and I recently upgraded to Spyder 4.2.0 from Spyder 4.1.5. Now when I run my code (which was working fine before) I get the following error:
ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.
So apparently Spyder thinks 'xlrd' ('Excel Reader'?) is not installed. So I went to the Anaconda prompt and tried pip install xlrd, but it replied with
Requirement already satisfied: xlrd in c:\users\michael\anaconda3\lib\site-packages (2.0.1)
I tried uninstalling and reinstalling xlrd anyways, using pip, but it didn't change anything. How do I resolve this error?
Also, I'm not sure if this matters or not, but I originally installed Spyder via Anaconda, whereas now I just downloaded Spyder 4.2.0 by itself, through this link: https://github.com/spyder-ide/spyder/releases.
Also, on the linked github page, it says: "If you are new to Python or the Scientific Python ecosystem, we strongly recommend you to install and use Anaconda. It comes with Spyder and all its dependencies, along with the most important Python scientific libraries (i.e. Numpy, Pandas, Matplotlib, IPython, etc) in a single, easy to use environment."
I had at first assumed this was meant for people downloading Python/Anaconda for the very first time, but now I'm thinking this applies to a semi newbie at Python such as me? As someone who is not very familiar with how packages and dependencies work, should I be downloading Anaconda every time I want to update Python or Spyder?
Apologies for the (probably) silly newbie question...
This sounds like you needed to re-start Spyder for it to pick up the package you installed.
However, as the author of xlrd, I would suggest you do the following:
Stop Spyder
conda install openpyxl
Start Spyder.
Change your pandas code to be pd.read_excel(..., engine='openpxyl')

Unable to import pygrib on python3 (Mac)

I've installed pygrib by using conda install -c conda-forge pygrib and no issues were raised. However, when importing it in order to use it I get this message:
ImportError: dlopen(/Users/andrea1994/anaconda3/lib/python3.6/site-packages/pygrib.cpython-36m-darwin.so, 2): Library not loaded: #rpath/libpng16.16.dylib
Referenced from: /Users/andrea1994/anaconda3/lib/python3.6/site-packages/pygrib.cpython-36m-darwin.so
Reason: Incompatible library version: pygrib.cpython-36m-darwin.so requires version 51.0.0 or later, but libpng16.16.dylib provides version 49.0.0
I've gone through several procedures that were thought to solve similar issues but none worked (updating libpng, uninstalling and installing back Anaconda,...). Does anyone have any clue? I'm not an expert in this field: most of the times I manage to get things working, but as you see sometimes I fail. Thank you!
I know this is old, but I had the same issue and finally was able to import pygrib after I started a clean environment, installed from conda
conda install -c conda-forge pygrib and then installed jasper, even though I believe it is installed with the pygrib install I am not sure if the correct one is installed or what.
conda install jasper -c conda-forge
sudo python -m pip install pygrib

qfrm module - No module named 'qfrm.Options' (Python 3.5.1)

I am quite newbie in python and I am trying to make the qfrm 0.2.0.27 library to work. Unfortunately there is no documentation about this library. I installed it using pip and when I try to import it I get the following error:
No module named 'qfrm.Options'
Does anyone have a solutions for this? I am using python 3.5.1. and PyCharm
I also ran into this problem. The current version in the PyPi index is qfrm-0.2.0.27.
The version on the website appears to be qfrm-0.2.0.23. Although it is older, it worked without error for me.
If you download the ...23 whl file and install that one (pip install [file_name].whl) you may find it works better.
I'm on Python version 2.7.11 and was unable to install qfrm version 0.2.0.27 and received the error message: No module named 'qfrm.Options'
However, I was able to install qfrm version 0.2.0.23, as follows: pip install -v qfrm==0.2.0.23

Pip, packages and Python3

i'm trying to install pydot in python3 and i came up with some questions:
The packages referenced by pip3.3 are the same referenced by pip2.7 or there is a different repository for the packages ?
How does all the packaging/distribution work in python ?
What should i do for installing pydot through pip ?
Actually the creator say that python3 is not supported, but pydot is listed in pip3.3
A fork of pydot (https://bitbucket.org/prologic/pydot) working on Python3 exists, why it is not listed in pip?
Can I install pydot through pip?
Almost all package/program distribution in python is done with distutils. This is very good documented in the python documentation.
To your specific problem: pip usually searches the PyPI for the package and then downloads a distribution of that package. Most often this is a source-package and needs to be byte-compiled. If that succeeds the package is most probably compatible to the python version you're using, if it's not you will most probably get SyntaxErrors or something like that.
As i know PyPI has no other, ultimate-sure version classifiers.
So the most sure way to tell if the package is compatible, is to try to install it and then try if it works.

Resources