Ask Your Question

Error building python 2 with sage

asked 2019-05-27 16:53:04 -0600

anonymous user


updated 2019-05-27 16:53:51 -0600

When I run the command sage -f python2 the error:

[python2-2.7.15.p0] Copying package files from temporary location /Applications/ to /Applications/
[python2-2.7.15.p0] cp: symlink: python-2.7.pc: File exists
[python2-2.7.15.p0] cp: symlink: python2.pc: File exists
[python2-2.7.15.p0] ************************************************************************
[python2-2.7.15.p0] Error copying files for python2-2.7.15.p0.
[python2-2.7.15.p0] ************************************************************************
[python2-2.7.15.p0] Please email sage-devel 
[python2-2.7.15.p0] explaining the problem and including the log file
[python2-2.7.15.p0]   /Applications/
[python2-2.7.15.p0] Describe your computer, operating system, etc.
[python2-2.7.15.p0] ************************************************************************
make[1]: *** [/Applications/] Error 1

real    2m38.586s
user    1m47.897s
sys 0m39.865s
Error building Sage.

The following package(s) may have failed to build (not necessarily during this run of 'make python2'):

* package: python2-2.7.15.p0
log file: /Applications/
  build directory: /Applications/

The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run 'make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.

make: *** [python2] Error 1

It looks like there is an error with a symlink - cp: symlink: python-2.7.pc: File exists

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-05-27 21:29:54 -0600

This should have been fixed by, which will be part of Sage 8.8 when it is released. In the mean time, delete the files SAGE_ROOT/local/lib/pkgconfig/python2.pc and SAGE_ROOT/local/lib/pkgconfig/python-2.7.pc, and then run makeagain. Or if you want, you can download the latest beta from and try that.

edit flag offensive delete link more


Thank you. Deleting the python* files in /Applications/ and rebuilding python worked!

davidcorbin gravatar imagedavidcorbin ( 2019-05-28 15:53:37 -0600 )edit

@davidcorbin -- please accept the answer by clicking the "tick" icon at the top left of the answer (just below the "upvote" button, "current number of votes" display, and "downvote" button). This will mark the answer as accepted, and the question will be marked as answered in the list of questions on the main Ask Sage page and on the results page for any search query that is matched by this question.

slelievre gravatar imageslelievre ( 2019-06-01 09:34:49 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-05-27 16:53:04 -0600

Seen: 113 times

Last updated: May 27 '19