Reputation: 391
I'm kind of new to installing modules in python. I looked at this, http://pythonhosted.org/pypng/png.html#png.Reader.asRGB8 But there is no download link.
It says "installation is trivial" but trivial means of little value or importance. So I google "python png module download" but all the links are for 'pypng' It says to use import png not import pypng.
So then I google how to install python modules, And I came across easy install. But easy install has its own installation also.
Is my best bet to use c# or c++ instead where it's much easier to download libraries?
Upvotes: 39
Views: 88798
Reputation: 467
On Ubuntu 20.04 this works:
install pip
sudo apt install python3-pip
install png
sudo pip3 install pypng
import library in code
import png
Upvotes: 4
Reputation: 1604
Here is another option, for conda users:
conda install -c eaton-lab pypng
Upvotes: 1
Reputation: 24334
I encountered several errors while trying to install pypng
.
I solved it with running it as ROOT:
$ sudo pip install pypng
Upvotes: 6
Reputation: 52695
Try to print in command line/Terminal:
pip install pypng
and then import in your code as
import png
These are the same packages but it should be installed and be imported under different names
Upvotes: 63