Problem with %attach on version 8.3. with Windows 10

asked 2018-11-03 14:27:46 -0600

updated 2018-11-04 10:10:48 -0600

The version of SageMath I use (on Windows 10) was recently updated to 8.3.

I use %attach.

When I save my updated source code I get the following error (I got no such problem with my previous version of SageMath).

How to solve this problem?

┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.3, Release Date: 2018-08-03                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
sage: %attach SAGE/3by3.spyx
Compiling ./SAGE/3by3.spyx...
sage:       0 [main] python2.7 16028 child_info_fork::abort: unable to map C:\Users\Sébastien Palcoux\.sage\temp\LAPTOP-7O5QV19T\16688\spyx\_home_sage_SAGE_3by3_spyx\_home_sage_SAGE_3by3_spyx_0.dll, Win32 error 126
### reloading attached file 3by3.spyx modified at 22:01:59 ###
Compiling /home/sage/SAGE/3by3.spyx...
---------------------------------------------------------------------------
EnvironmentError                          Traceback (most recent call last)
<ipython-input-2-5e6cb74ebb82> in <module>()
----> 1 sage.repl.load.load(sage.repl.load.base64.b64decode("L2hvbWUvc2FnZS9TQUdFLzNieTMuc3B5eA=="),globals(),True)

/opt/sagemath-8.3/local/lib/python2.7/site-packages/sage/repl/load.pyc in load(filename, globals, attach)
    265         if attach:
    266             add_attached_file(fpath)
--> 267         exec(load_cython(fpath), globals)
    268     elif ext == '.f' or ext == '.f90':
    269         from sage.misc.inline_fortran import fortran

/opt/sagemath-8.3/local/lib/python2.7/site-packages/sage/repl/load.pyc in load_cython(name)
     65     """
     66     from sage.misc.cython import cython
---> 67     mod, dir = cython(name, compile_message=True, use_cache=True)
     68     import sys
     69     sys.path.append(dir)

/opt/sagemath-8.3/local/lib/python2.7/site-packages/sage/misc/cython.pyc in cython(filename, verbose, compile_message, use_cache, create_local_c_file, annotate, sage_namespace, create_local_so_file)
    612             try:
    613                 ext, = cythonize([ext],
--> 614                         aliases=cython_aliases(),
    615                         include_path=includes,
    616                         quiet=(verbose <= 0),

/opt/sagemath-8.3/local/lib/python2.7/site-packages/sage/env.pyc in cython_aliases()
    308     for lib in ['fflas-ffpack', 'givaro', 'gsl', 'linbox', 'Singular']:
    309         var = lib.upper().replace("-", "") + "_"
--> 310         aliases[var + "CFLAGS"] = pkgconfig.cflags(lib).split()
    311         pc = pkgconfig.parse(lib)
    312         # INCDIR should be redundant because the -I options are also

/opt/sagemath-8.3/local/lib/python2.7/site-packages/pkgconfig/pkgconfig.pyc in cflags(package)
    103     If ``pkg-config`` not on path, raises ``EnvironmentError``.
    104     """
--> 105     return _query(package, '--cflags')
    106
    107

/opt/sagemath-8.3/local/lib/python2.7/site-packages/pkgconfig/pkgconfig.pyc in _wrapper(*args, **kwargs)
     59             return func(*args, **kwargs)
     60         except OSError:
---> 61             raise EnvironmentError("pkg-config is not installed")
     62
     63     return _wrapper

EnvironmentError: pkg-config is not installed
edit retag flag offensive close merge delete

Comments

Could you please tell us:

  • which OS ?
  • did you install Sage from the binaries, and which ones ?
  • did you compile Sage yourself ?
tmonteil gravatar imagetmonteil ( 2018-11-03 20:37:27 -0600 )edit

Windows 10. I downloaded the .exe file from the following page: http://www-ftp.lip6.fr/pub/math/sagem...

Sébastien Palcoux gravatar imageSébastien Palcoux ( 2018-11-04 04:38:54 -0600 )edit

Sorry, I have no idea. You might have a virus scanner or something interfering with the newly compiled DLL... Strangely, when I try using %attach on a .pyx or .spyx file on the newly release Sage 8.4 I just get a file not found error, which is also not so good.

Iguananaut gravatar imageIguananaut ( 2018-11-06 03:19:54 -0600 )edit

I've opened an issue about this here: https://github.com/sagemath/sage-wind... The error you're getting could be related as well, even though it's exhibiting in a different way. I'm not 100% sure about that though.

Iguananaut gravatar imageIguananaut ( 2018-11-06 03:27:18 -0600 )edit