Closed landreman closed 3 years ago
@landreman Good catch. I was trying to fix the issues (https://github.com/PrincetonUniversity/SPEC/compare/pypi?expand=1). But now I got the weird error of setup.py: error: unrecognized arguments: --egg-base
. I have no idea why the new changes lead to such an error and I didn't find anything related to this error online.
Does anyone have a clue?
$ pip install -e .
Obtaining file:///Users/caoxiang/Documents/Codes/SPEC/Utilities/pythontools
ERROR: Command errored out with exit status 2:
command: /opt/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/caoxiang/Documents/Codes/SPEC/Utilities/pythontools/setup.py'"'"'; __file__='"'"'/Users/caoxiang/Documents/Codes/SPEC/Utilities/pythontools/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/c8/634lbtm911lc1bg5bvch5tdw0000gn/T/pip-pip-egg-info-c205dwd8
cwd: /Users/caoxiang/Documents/Codes/SPEC/Utilities/pythontools/
Complete output (2 lines):
usage: setup.py [-h] [-t TOL] filename reference
setup.py: error: unrecognized arguments: --egg-base
----------------------------------------
ERROR: Command errored out with exit status 2: python setup.py egg_info Check the logs for full command output.
``
I unfortunately don't have any ideas about the unrecognized arguments: --egg-base
error.
In Utilities/pythontools/py_spec/ci
there is a file __init.py
rather than __init__.py
. Is this a mistake?
@landreman That solves the problem. I think I fixed it and it now works in the pypi
branch. I will create a pull request now.
@landreman, is the issue resolved for you? If so then I will close it.
Great catch, thanks for finding it, the misnamed file was likely a typo on my part when I created the file, but the import still succeeded on my system because the folder was hard-coded into my pythonpath.
Yes, the issue is resolved for me.
When py_spec is installed from pypi using
pip install py_spec
, and you try toimport py_spec
in python, the following error occurs:I get this error both on my macbook using conda, and also on the Github Actions Ubuntu system. The error does not occur when installing py_spec from a copy of the repository using
pip install -e .
Also the README says that py_spec can be installed by
but this seems to give an error:
Looking at this link, a variant that does work on my end is
If py_spec is installed this way, the
cannot import name 'ci'
error still occurs.