Ask Your Question
0

Install pypolymake on SageMath

asked 2022-09-18 12:01:36 +0100

lijr07 gravatar image

I am trying to install pypolymake on SageMath. I follow the method in https://pypi.org/project/pypolymake/

I tried to use the command:

sage -pip install pypolymake

but it has errors:

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

× Encountered error while trying to install package. ╰─> pypolymake

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

How to install polymake on SageMath? Thank you very much.

edit retag flag offensive close merge delete

Comments

What is your operating system and SageMath version?

Max Alekseyev gravatar imageMax Alekseyev ( 2022-09-18 16:06:43 +0100 )edit

@max, thank you very much. My operating system is Mac Intel version, mac os 11.5.2, and SageMath version is sage 9.4.

lijr07 gravatar imagelijr07 ( 2022-09-19 13:28:43 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2022-09-18 19:03:42 +0100

tmonteil gravatar image

updated 2022-09-19 00:38:10 +0100

If you installed Sage from source, executing the following command should work:

sage -i polymake

Alternatively, you can do, from the root of your Sage installation:

./configure --enable-polymake
make

Note that the compile time is very long, so that you might want to compile in parallel, by adding before the make command:

export MAKE='make -j6'

(in the case you want to use 6 cores)

Regarding the pypolymake package, installing it from Sage distribution is a work in progress : https://trac.sagemath.org/ticket/21170 but it is likely that once polymake is installed, installing pypolymake from pip will work.

edit flag offensive delete link more

Comments

@tmonteil, thank you very much. I installed polymake using

./configure --enable-polymake
make

but it still has the same errors:

  In file included from polymake/perl_object.cpp:746:
  polymake/wrap.h:6:10: fatal error: 'polymake/Main.h' file not found
  #include <polymake/Main.h>
           ^~~~~~~~~~~~~~~~~
  1 error generated.
  error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -O2 -mmacosx-version-min=10.9 -mno-avx -mno-avx2 -mno-bmi2 -Ipolymake -I/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/include/python3.10 -c polymake/perl_object.cpp -o build/temp.macosx-10.9-x86_64-3.10/polymake/perl_object.o" failed with exit status 1
  [end of output]
lijr07 gravatar imagelijr07 ( 2022-09-19 13:34:00 +0100 )edit

@tmoteil, I used the second method to install polymake. If I use

sage -i polymake

to install polymake, it has the following error:

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

 * package:         perl_cpan_polymake_prereq-none
  last build time: Sep 19 13:35
  log file:        /Users/jianrongli/SageMath/logs/pkgs/perl_cpan_polymake_prereq-none.log

It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent t
lijr07 gravatar imagelijr07 ( 2022-09-19 13:39:40 +0100 )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

Stats

Asked: 2022-09-18 12:01:36 +0100

Seen: 307 times

Last updated: Sep 19 '22