Kattis / problemtools

Tools to manage problem packages using the Kattis problem package format.
MIT License
105 stars 72 forks source link

OSX 12.5 install attempt #217

Closed jifland closed 1 year ago

jifland commented 1 year ago

Trying to get problem tools installed.

Installed homebrew, and then pip3 command was recognized.

running: pip3 install git+https://github.com/kattis/problemtools

I now get he following errors Defaulting to user installation because normal site-packages is not writeable Collecting git+https://github.com/kattis/problemtools Cloning https://github.com/kattis/problemtools to /private/var/folders/7m/m_vsl4ls5wd3btgsf7kg76xc0000gn/T/pip-req-build-qfeckam6 Running command git clone --filter=blob:none --quiet https://github.com/kattis/problemtools /private/var/folders/7m/m_vsl4ls5wd3btgsf7kg76xc0000gn/T/pip-req-build-qfeckam6 Resolved https://github.com/kattis/problemtools to commit 94fd22efe01bc1cb02cdc2cc1a13a6e0727dab4a Running command git submodule update --init --recursive -q Preparing metadata (setup.py) ... done Requirement already satisfied: PyYAML in /Users/jeff/Library/Python/3.9/lib/python/site-packages (from problemtools==1.20191126.post1.dev62) (6.0) Requirement already satisfied: plasTeX>=2.0 in /Users/jeff/Library/Python/3.9/lib/python/site-packages (from problemtools==1.20191126.post1.dev62) (3.0) Requirement already satisfied: Jinja2>=2.10.1 in /Users/jeff/Library/Python/3.9/lib/python/site-packages (from plasTeX>=2.0->problemtools==1.20191126.post1.dev62) (3.1.2) Requirement already satisfied: Pillow>=7 in /Users/jeff/Library/Python/3.9/lib/python/site-packages (from plasTeX>=2.0->problemtools==1.20191126.post1.dev62) (9.4.0) Requirement already satisfied: typing-extensions>=3.7 in /Users/jeff/Library/Python/3.9/lib/python/site-packages (from plasTeX>=2.0->problemtools==1.20191126.post1.dev62) (4.4.0) Requirement already satisfied: Unidecode>=0.4.21 in /Users/jeff/Library/Python/3.9/lib/python/site-packages (from plasTeX>=2.0->problemtools==1.20191126.post1.dev62) (1.3.6) Requirement already satisfied: MarkupSafe>=2.0 in /Users/jeff/Library/Python/3.9/lib/python/site-packages (from Jinja2>=2.10.1->plasTeX>=2.0->problemtools==1.20191126.post1.dev62) (2.1.1) Building wheels for collected packages: problemtools Building wheel for problemtools (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [40 lines of output] /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/dist.py:487: UserWarning: Normalizing '1.20191126-rev1.dev62' to '1.20191126.post1.dev62' warnings.warn(tmpl.format(**locals())) running bdist_wheel running build running build_support Running command: make -C support install DESTDIR=/private/var/folders/7m/m_vsl4ls5wd3btgsf7kg76xc0000gn/T/pip-req-build-qfeckam6/build/lib/problemtools/support cd checktestdata && ./bootstrap + aclocal -I m4 ./bootstrap: line 8: aclocal: command not found make: *** [checktestdata/config.mk] Error 127 Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/private/var/folders/7m/m_vsl4ls5wd3btgsf7kg76xc0000gn/T/pip-req-build-qfeckam6/setup.py", line 66, in setup(name='problemtools', File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup return distutils.core.setup(**attrs) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup dist.run_commands() File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run self.run_command('build') File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/7m/m_vsl4ls5wd3btgsf7kg76xc0000gn/T/pip-req-build-qfeckam6/setup.py", line 44, in run self.run_command('build_support') File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/7m/m_vsl4ls5wd3btgsf7kg76xc0000gn/T/pip-req-build-qfeckam6/setup.py", line 29, in run subprocess.check_call(command) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['make', '-C', 'support', 'install', 'DESTDIR=/private/var/folders/7m/m_vsl4ls5wd3btgsf7kg76xc0000gn/T/pip-req-build-qfeckam6/build/lib/problemtools/support']' returned non-zero exit status 2. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for problemtools Running setup.py clean for problemtools Failed to build problemtools Installing collected packages: problemtools Running setup.py install for problemtools ... error error: subprocess-exited-with-error × Running setup.py install for problemtools did not run successfully. │ exit code: 1 ╰─> [42 lines of output] /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/dist.py:487: UserWarning: Normalizing '1.20191126-rev1.dev62' to '1.20191126.post1.dev62' warnings.warn(tmpl.format(**locals())) running install running build running build_support Running command: make -C support install DESTDIR=/private/var/folders/7m/m_vsl4ls5wd3btgsf7kg76xc0000gn/T/pip-req-build-qfeckam6/build/lib/problemtools/support cd checktestdata && ./bootstrap + aclocal -I m4 ./bootstrap: line 8: aclocal: command not found make: *** [checktestdata/config.mk] Error 127 Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/private/var/folders/7m/m_vsl4ls5wd3btgsf7kg76xc0000gn/T/pip-req-build-qfeckam6/setup.py", line 66, in setup(name='problemtools', File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup return distutils.core.setup(**attrs) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup dist.run_commands() File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/command/install.py", line 562, in run self.run_command('build') File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/7m/m_vsl4ls5wd3btgsf7kg76xc0000gn/T/pip-req-build-qfeckam6/setup.py", line 44, in run self.run_command('build_support') File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/7m/m_vsl4ls5wd3btgsf7kg76xc0000gn/T/pip-req-build-qfeckam6/setup.py", line 29, in run subprocess.check_call(command) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['make', '-C', 'support', 'install', 'DESTDIR=/private/var/folders/7m/m_vsl4ls5wd3btgsf7kg76xc0000gn/T/pip-req-build-qfeckam6/build/lib/problemtools/support']' returned non-zero exit status 2. [end of output] 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. ╰─> problemtools note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

I apologize that I am not familiar enough to quickly see where to go and what to try to fix this. I am willing to work to try to help put together instructions to get these working on OSX.

jifland commented 1 year ago

Note that cloning and then running make getthe following error (which is listed in the pip3 install output messages above):

problemtools % make make -C support cd checktestdata && ./bootstrap

jifland commented 1 year ago

Ok, for documentation purposes and in case this is helpful to others, the automake tool is not installed and that causes problems. One solution to this is to install homebrew, and then use that to install automake (note there is some issue with homebrew where a command needs to be run so that homebrew will run)

I started out by installing xcode for the command line tools it provides (compilers and such).

install homebrew per the instructions on their site. run the following command to get OSX to be able to run the brew command (you may want this in the shell initilazation file as it needs to be run per terminal, if you want to use home brew in that terminal): eval $(/opt/homebrew/bin/brew shellenv)

install automake via homebrew witht eh following command: brew install automake

This allowed me to be able to have the make script on the problem tools package complete successfully. I'm about to dive into working with it, and may run into issues here. If so, I will try to document them as well.