[pythran] Re: %matplotlib instruction crashes pythran.magic

  • From: Pierre Augier <pierre.augier@xxxxxxxxxxxxxxxxxxxxxx>
  • To: pythran@xxxxxxxxxxxxx
  • Date: Fri, 25 Oct 2019 14:34:42 +0200

Hi Pierre,

The conda package osx-64/pythran-0.9.3.post1-py37????_0.tar.bz2 <https://anaconda.org/conda-forge/pythran/0.9.3.post0/download/osx-64/pythran-0.9.3.post0-py37h770b8ee_0.tar.bz2> is missing (https://anaconda.org/conda-forge/pythran/files), which explains why you get this error.

It's strange that it is missing because it seems that it has been built https://github.com/conda-forge/pythran-feedstock/pull/20

++

(another) Pierre

Le 25/10/2019 à 11:23, Ashwin Vishnu a écrit :

Hi Pierre,

That is a different error. Most likely you have the latest versions of gast and beniget (which again is strange, as conda should be good at dependency resolution).

In order to work, you should have:

        - beniget =0.1.0
        - gast =0.2.2

Best,
Ashwin

On 10/25/19 10:59 AM, Pierre Navaro wrote:
Thanks Ashwin

It seems there is a lot of problems on macosx, i just tried with miniconda

$ conda create -n pythran python=3.7
$ conda activate pythran
$ conda install pythran -c conda-forge
$ python
Python 3.7.3 | packaged by conda-forge | (default, Jul  1 2019, 14:38:56)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pythran
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/miniconda3/envs/pythran/lib/python3.7/site-packages/pythran/__init__.py", line 40, in <module>
    from pythran.toolchain import (generate_cxx, compile_cxxfile, compile_cxxcode,
  File "/opt/miniconda3/envs/pythran/lib/python3.7/site-packages/pythran/toolchain.py", line 6, in <module>
    from pythran.backend import Cxx, Python
  File "/opt/miniconda3/envs/pythran/lib/python3.7/site-packages/pythran/backend.py", line 8, in <module>
    from pythran.analyses import LocalNodeDeclarations, GlobalDeclarations, Scope
  File "/opt/miniconda3/envs/pythran/lib/python3.7/site-packages/pythran/analyses/__init__.py", line 12, in <module>
    from .aliases import Aliases, StrictAliases
  File "/opt/miniconda3/envs/pythran/lib/python3.7/site-packages/pythran/analyses/aliases.py", line 6, in <module>
    from pythran.syntax import PythranSyntaxError
  File "/opt/miniconda3/envs/pythran/lib/python3.7/site-packages/pythran/syntax.py", line 7, in <module>
    from pythran.tables import MODULES
  File "/opt/miniconda3/envs/pythran/lib/python3.7/site-packages/pythran/tables.py", line 173, in <module>
    BINARY_UFUNC = {"accumulate": FunctionIntr()}
  File "/opt/miniconda3/envs/pythran/lib/python3.7/site-packages/pythran/intrinsic.py", line 94, in __init__
    super(FunctionIntr, self).__init__(**kwargs)
  File "/opt/miniconda3/envs/pythran/lib/python3.7/site-packages/pythran/intrinsic.py", line 58, in __init__
    [to_ast(d) for d in kwargs.get('defaults', [])])
  File "/opt/miniconda3/envs/pythran/lib/python3.7/site-packages/gast/gast.py", line 19, in create_node
    format(Name, nbparam, len(Fields))
AssertionError: Bad argument number for arguments: 6, expecting 7
>>>

On 25 Oct 2019, at 10:38, Ashwin Vishnu <avmo@xxxxxx <mailto:avmo@xxxxxx>> wrote:

Hi Pierre,

It is a strange error, I don't have a Mac so I am not 100% sure. I followed what you did on Linux
with a small variation:

In [1]: %matplotlib
Using matplotlib backend: TkAgg

And it works well. This is not a solution, but could you try a different matplotlib backend (https://matplotlib.org/tutorials/introductory/usage.html?#backends)?

Cheers,
Ashwin

On 10/25/19 10:25 AM, Pierre Navaro wrote:
Using matplotlib backend: MacOSX



Pierre Navaro
Ingénieur CNRS en calcul scientifique
IRMAR, Campus de Beaulieu, bâtiment 22, bureau 112
263 avenue du Général Leclerc, CS 74205
35042  RENNES Cedex
0223234308
https://osm.org/go/eri2d0PNY






--
Pierre Augier - CR CNRS                 http://www.legi.grenoble-inp.fr
LEGI (UMR 5519) Laboratoire des Ecoulements Geophysiques et Industriels
BP53, 38041 Grenoble Cedex, France                tel:+33.4.56.52.86.16

Other related posts: