ramachandran-lab/pong

ERROR: Command errored out with exit status 1:

Closed this issue · 10 comments

I've been trying to install Pong in both a Mac (OSX 10.13.6) and in a Windows 10 (I know, the page says it has not been tested/validated for Windows 10 yet), and I'm getting the same error code in both computers.

I installed Python 3.8.5 and pip (20.2.3), but every time I try to install pong I get the same following error. The message is the same in the OSX and Windows computer. In the Mac I tried both running with the standard OSX Python version (2.7.16) and using "python3 -m" before the ping install command:

python3 -m pip install --upgrade pong
Collecting pong
Using cached pong-1.4.9.tar.gz (1.1 MB)
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/br/y7nnwlhn48s_myy9c9dvt5y00000gn/T/pip-install-rhooz8wg/pong/setup.py'"'"'; file='"'"'/private/var/folders/br/y7nnwlhn48s_myy9c9dvt5y00000gn/T/pip-install-rhooz8wg/pong/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/br/y7nnwlhn48s_myy9c9dvt5y00000gn/T/pip-pip-egg-info-d336y72o
cwd: /private/var/folders/br/y7nnwlhn48s_myy9c9dvt5y00000gn/T/pip-install-rhooz8wg/pong/
Complete output (5 lines):
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/br/y7nnwlhn48s_myy9c9dvt5y00000gn/T/pip-install-rhooz8wg/pong/setup.py", line 5, in
execfile("pong/init.py")
NameError: name 'execfile' is not defined
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Any thoughts on what might be going wrong with my installation?
Thanks in advance!

Hi,

Unfortunately this is due to the fact that pong was written with python 2 and execfile is not defined in python 3.

We are in the process of validating a python 3 release. Can you try installing with python 2?

The error you posted above is trying to install pong with python 3 (from your error post: command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3). You shouldn't be getting the same error with python 2.

Let us know what happens with python 2 installation and we can go from there!

Thanks for the quick reply!
I indeed don't get that error, but I still cannot run it. See below.

python -m pip install pong
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting pong
Using cached pong-1.4.9.tar.gz (1.1 MB)
Requirement already satisfied: numpy<1.17,>=1.9.2 in ./Library/Python/2.7/lib/python/site-packages (from pong) (1.16.6)
Requirement already satisfied: tornado<6 in ./Library/Python/2.7/lib/python/site-packages (from pong) (5.1.1)
Requirement already satisfied: munkres<1.1,>=1.0.7 in ./Library/Python/2.7/lib/python/site-packages (from pong) (1.0.12)
Requirement already satisfied: networkx<=2.2,>=1.10 in ./Library/Python/2.7/lib/python/site-packages (from pong) (2.2)
Requirement already satisfied: futures in ./Library/Python/2.7/lib/python/site-packages (from tornado<6->pong) (3.3.0)
Requirement already satisfied: singledispatch in ./Library/Python/2.7/lib/python/site-packages (from tornado<6->pong) (3.4.0.3)
Requirement already satisfied: backports_abc>=0.4 in ./Library/Python/2.7/lib/python/site-packages (from tornado<6->pong) (0.5)
Requirement already satisfied: decorator>=4.3.0 in ./Library/Python/2.7/lib/python/site-packages (from networkx<=2.2,>=1.10->pong) (4.4.2)
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from singledispatch->tornado<6->pong) (1.4.1)
Using legacy 'setup.py install' for pong, since package 'wheel' is not installed.
Installing collected packages: pong
Running setup.py install for pong ... done
Successfully installed pong-1.4.9

gustavostahelin$ pong -h
-bash: pong: command not found

--- Edit
If I try to access the folder where the above message indicates pong was installed and run pong from there, it also doesn't work, or run python indicating that folder as the path to python executables:

python /Users/gustavostahelin/Library/Python/2.7/lib/python/site-packages/pong -h
/usr/bin/python: can't find 'main' module in '/Users/gustavostahelin/Library/Python/2.7/lib/python/site-packages/pong'

I also have been trying to find the pong executable, but it does not seem to find it either.
gustavostahelin$ type -a pong
-bash: type: pong: not found

I think it might be a path issue. What files are inside /Users/gustavostahelin/Library/Python/2.7/lib/python/site-packages/pong?

If run_pong.py is inside that folder, can you try: python /Users/gustavostahelin/Library/Python/2.7/lib/python/site-packages/pong/run_pong.py -h?

Nope, run_pong.py is not there. Here the files inside the folder:

init.py cm.py distruct.py parse.py write.py
init.pyc cm.pyc distruct.pyc parse.pyc write.pyc
align.py dist_metrics.py objects.py static
align.pyc dist_metrics.pyc objects.pyc templates

I am unfortunately not familiar with pip and where/how it install things, so I will defer to @abehr on how to solve this problem.

Other things off the top of my head to try with no guarantee, would be:
(1) check if a folder like /Users/gustavostahelin/Library/Python/2.7/bin exists (instead of lib) because I would assume the executables would be in bin.
(2) if the dependencies were installed properly and it's just pong that is the issue, then you can clone the git repo and then do python <PATH TO REPO>/run_pong.py -h

Indeed the file was inside the /2.7/bin folder! It's only "pong", but I believe I can not just run it from anywhere with this path before it, correct?

$ python pong -h
usage: pong [-h] -m FILEMAP [-c IGNORE_COLS] [-o OUTPUT_DIR] [-i IND2POP]
[-n POP_NAMES] [-l COLOR_LIST] [-f] [-s SIM_THRESHOLD]
[--col_delim COL_DELIM] [--dist_metric DIST_METRIC]
[--disable_server] [-p PORT] [-v] [-g]

-------------------------------- pong, v1.4.9 --------------------------------

optional arguments:
-h, --help show this help message and exit
-m FILEMAP, --filemap FILEMAP

... and it keeps going the help menu.

Thank you very much!!

If the installation was done correctly, then I believe (not 100% sure) this executable with the absolute path should run properly from any working directory. Going to close the ticket for now, but please re-open if there are ongoing issues.

*EDIT in italics

abehr commented

Hi - The python3 version of pong is still being tested, but here's a copy of the current dev version. Since python2 is deprecated, it may be easier to run this version. It's not a pip install, so you can just run the exec file directly with python3 run_pong.py <options>.

That's great, this one worked with Python3 (at least the -h), I just had to manually install some extra required packages.

Thanks!

abehr commented

Glad to hear it! Let us know if you run into any issues. We're especially interested in your experience running the new version of pong on Windows 10, as we have done the least amount of testing in that environment.