First time here? Check out the FAQ!

Ask Your Question
0

Install pypolymake on SageMath

asked 2 years ago

lijr07 gravatar image

updated 0 years ago

FrédéricC 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.

Preview: (hide)

Comments

What is your operating system and SageMath version?

Max Alekseyev gravatar imageMax Alekseyev ( 2 years ago )

@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 ( 2 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 2 years ago

tmonteil gravatar image

updated 2 years ago

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.

Preview: (hide)
link

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 ( 2 years ago )

@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 ( 2 years ago )

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: 2 years ago

Seen: 363 times

Last updated: Sep 19 '22