prettymaps icon indicating copy to clipboard operation
prettymaps copied to clipboard

Disappointed !

Open jmbernabotto opened this issue 3 years ago • 17 comments

Whatever the solution I try, I have an error. I'm so disappointed !!

With Colab : here the error after the build instruction (fig, ax = plt.subplots(figsize = (12, 12), constrained_layout = True)...)

ImportError
Traceback (most recent call last) in () 41 ) 42 ---> 43 plt.savefig('../prints/macao.png') 44 plt.savefig('../prints/macao.svg')

3 frames /usr/local/lib/python3.7/dist-packages/matplotlib/backends/backend_agg.py in print_png(self, filename_or_obj, metadata, pil_kwargs, *args, **kwargs) 503 Keyword arguments passed to PIL.Image.Image.save. 504 --> 505 If the 'pnginfo' key is present, it completely overrides 506 metadata, including the default 'Software' key. 507 """

ImportError: cannot import name '_png' from 'matplotlib' (/usr/local/lib/python3.7/dist-packages/matplotlib/init.py)

With my Mac, it's worth. I have a Mac Mini M1 and a Macbook Pro Intel. pip install git+https://github.com/marceloprates/prettymaps.git make an error. I'm sure my pip is useful because I often use it !

With a PC under Windows 10, same issue !

The only way I don't try it's Linux way. I'm going to try it !

I will be so happy when I will succeed to product a map ! Can somebody help me ?

jmbernabotto avatar Aug 30 '21 09:08 jmbernabotto

I fixed this issue including the line in the first code cell: !pip install matplotlib==3.1.3

I am on a M1 Mac and it is now working fine.

ushham avatar Aug 30 '21 10:08 ushham

@ushham you mean I have to do : !pip install matplotlib==3.1.3 !pip install git+https://github.com/abey79/vsketch#egg=vsketch !pip install git+https://github.com/marceloprates/prettymaps.git

?

jmbernabotto avatar Aug 30 '21 10:08 jmbernabotto

Exactly, my first code box reads:

!pip install git+https://github.com/abey79/vsketch#egg=vsketch
!pip install git+https://github.com/marceloprates/prettymaps.git

!pip install matplotlib==3.1.3

!mkdir ../prints
!mkdir ../assets
!mkdir ../assets/Permanent_Marker/
!wget -O ../assets/Permanent_Marker/PermanentMarker-Regular.ttf https://github.com/marceloprates/prettymaps/raw/main/assets/Permanent_Marker/PermanentMarker-Regular.ttf

You then need to rerstart the runtime once these edits are made (Runtime -> restart runtime)

ushham avatar Aug 30 '21 10:08 ushham

OK ! Thanks Ushham, I'm going to test it !

Le lun. 30 août 2021 à 12:31, ushham @.***> a écrit :

Exactly, my first code box reads: `!pip install git+https://github.com/abey79/vsketch#egg=vsketch !pip install git+https://github.com/marceloprates/prettymaps.git

!pip install matplotlib==3.1.3

!mkdir ../prints !mkdir ../assets !mkdir ../assets/Permanent_Marker/ !wget -O ../assets/Permanent_Marker/PermanentMarker-Regular.ttf https://github.com/marceloprates/prettymaps/raw/main/assets/Permanent_Marker/PermanentMarker-Regular.ttf`

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/marceloprates/prettymaps/issues/38#issuecomment-908231792, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJDEUSK5YSMH6VQYGZOSYALT7NMZHANCNFSM5DBPUX2Q .

jmbernabotto avatar Aug 30 '21 10:08 jmbernabotto

unfortunately no way to install vsketch and prettymap here the response ERROR: Command errored out with exit status 1: git clone -q https://github.com/abey79/vsketch /private/var/folders/qv/v183qw9s6lj_35jwqy5_b72c0000gn/T/pip-req-build-hu3abp4z Check the logs for full command output.

ERROR: Command errored out with exit status 1: git clone -q https://github.com/marceloprates/prettymaps.git /private/var/folders/qv/v183qw9s6lj_35jwqy5_b72c0000gn/T/pip-req-build-a49tcdag Check the logs for full command output.

jmbernabotto avatar Aug 30 '21 17:08 jmbernabotto

maybe u need this.
for vsketch:use this install method for prettymaps:Windows Binaries for Python Extension Packages 1.search for GDAL->download whl file->pip install xxx.whl 2. search for Fiona->download whl file->pip install xxx.whl

MrBeike avatar Aug 31 '21 02:08 MrBeike

thanks @MrBeike It's all very inconvenient and this is the first time I've had to do so much to install a library. :-(

jmbernabotto avatar Aug 31 '21 07:08 jmbernabotto

@jmbernabotto did it work? I had the same issue, followed @ushham's advice and it works like a charm.

ddb95 avatar Sep 01 '21 03:09 ddb95

No, it does not work despite of @ushahm's advice :-(

Le mer. 1 sept. 2021 à 05:44, DEBADATTA BHATTACHARJEE < @.***> a écrit :

@jmbernabotto https://github.com/jmbernabotto did it work? I had the same issue, followed @ushham https://github.com/ushham's advice and it works like a charm.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/marceloprates/prettymaps/issues/38#issuecomment-909850420, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJDEUSOEZ2WC3BV772TQLV3T7WOQRANCNFSM5DBPUX2Q .

jmbernabotto avatar Sep 01 '21 07:09 jmbernabotto

If you don't mind, can you let me know where you are getting the error?

ddb95 avatar Sep 01 '21 17:09 ddb95

  1. Add !pip install matplotlib==3.1.3

!pip install git+https://github.com/marceloprates/prettymaps.git

!pip install matplotlib==3.1.3

!mkdir ../prints

!mkdir ../assets

!mkdir ../assets/Permanent_Marker/

!wget -O ../assets/Permanent_Marker/PermanentMarker-Regular.ttf 

https://github.com/marceloprates/prettymaps/raw/main/assets/Permanent_Marker/PermanentMarker-Regular.ttf```

ddb95 avatar Sep 01 '21 17:09 ddb95

  1. Run the code block

  2. Restart the runtime once these edits are made (Runtime -> restart runtime) (if you ran the code block without editing)

ddb95 avatar Sep 01 '21 17:09 ddb95

Here the first error, when I launch : pip install pip install git+https://github.com/marceloprates/prettymaps.git

Collecting git+https://github.com/marceloprates/prettymaps.git Cloning https://github.com/marceloprates/prettymaps.git to /private/var/folders/qv/v183qw9s6lj_35jwqy5_b72c0000gn/T/pip-req-build-8yy8h_h8 Running command git clone -q https://github.com/marceloprates/prettymaps.git /private/var/folders/qv/v183qw9s6lj_35jwqy5_b72c0000gn/T/pip-req-build-8yy8h_h8 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun WARNING: Discarding git+https://github.com/marceloprates/prettymaps.git. Command errored out with exit status 1: git clone -q https://github.com/marceloprates/prettymaps.git /private/var/folders/qv/v183qw9s6lj_35jwqy5_b72c0000gn/T/pip-req-build-8yy8h_h8 Check the logs for full command output. ERROR: Command errored out with exit status 1: git clone -q https://github.com/marceloprates/prettymaps.git /private/var/folders/qv/v183qw9s6lj_35jwqy5_b72c0000gn/T/pip-req-build-8yy8h_h8 Check the logs for full command output.

So I can’t follow next instructions

Le 1 sept. 2021 à 19:13, DEBADATTA BHATTACHARJEE @.***> a écrit :

pip install git+https://github.com/marceloprates/prettymaps.git git+https://github.com/marceloprates/prettymaps.git

jmbernabotto avatar Sep 02 '21 06:09 jmbernabotto

@jmbernabotto The solution presented here might help!

larsjuvik avatar Sep 02 '21 23:09 larsjuvik

@jmbernabotto ok. Let me look if I can help you. Are you running it on Colab or local instance?

ddb95 avatar Sep 03 '21 03:09 ddb95

I tried both. Same issue.

Le 3 sept. 2021 à 05:26, DEBADATTA BHATTACHARJEE @.***> a écrit :

 @jmbernabotto ok. Let me look if I can help you. Are you running it on Colab or local instance?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

jmbernabotto avatar Sep 03 '21 04:09 jmbernabotto

maybe u need this. for vsketch:use this install method for prettymaps:Windows Binaries for Python Extension Packages 1.search for GDAL->download whl file->pip install xxx.whl 2. search for Fiona->download whl file->pip install xxx.whl

This worked for me. Before running the installation cell, I installed the GDAL and Fiona with this method.

After that I ran the installation cell with !pip install git+https://github.com/abey79/vsketch#egg=vsketch !pip install git+https://github.com/marceloprates/prettymaps.git

But I had trouble with the import of shapely. So i ran pip uninstall shapely and installed it with conda install shapely. This solved some package dependencies.

With all that, I got prettymaps working on a local enviroment. I think it's worth it.

gonzalezhomar avatar Sep 23 '21 17:09 gonzalezhomar