Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disappointed ! #38

Open
jmbernabotto opened this issue Aug 30, 2021 · 17 comments
Open

Disappointed ! #38

jmbernabotto opened this issue Aug 30, 2021 · 17 comments

Comments

@jmbernabotto
Copy link

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 ?

@ushham
Copy link

ushham commented Aug 30, 2021

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.

@jmbernabotto
Copy link
Author

@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

?

@ushham
Copy link

ushham commented Aug 30, 2021

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)

@jmbernabotto
Copy link
Author

jmbernabotto commented Aug 30, 2021 via email

@jmbernabotto
Copy link
Author

jmbernabotto commented Aug 30, 2021

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.

@MrBeike
Copy link

MrBeike commented Aug 31, 2021

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

@jmbernabotto
Copy link
Author

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

@ddb95
Copy link

ddb95 commented Sep 1, 2021

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

@jmbernabotto
Copy link
Author

jmbernabotto commented Sep 1, 2021 via email

@ddb95
Copy link

ddb95 commented Sep 1, 2021

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

@ddb95
Copy link

ddb95 commented Sep 1, 2021

  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
Copy link

ddb95 commented Sep 1, 2021

  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)

@jmbernabotto
Copy link
Author

jmbernabotto commented Sep 2, 2021 via email

@larsjuvik
Copy link

@jmbernabotto The solution presented here might help!

@ddb95
Copy link

ddb95 commented Sep 3, 2021

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

@jmbernabotto
Copy link
Author

jmbernabotto commented Sep 3, 2021 via email

@gonzalezhomar
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants