straight-terabyte-91673
10/22/2020, 8:31 PMTraceback (most recent call last):
File "/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0/bin/pants", line 8, in <module>
sys.exit(main())
File "/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0/lib/python2.7/site-packages/pants/bin/pants_loader.py", line 85, in main
PantsLoader.run()
File "/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0/lib/python2.7/site-packages/pants/bin/pants_loader.py", line 81, in run
cls.load_and_execute(entrypoint)
File "/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0/lib/python2.7/site-packages/pants/bin/pants_loader.py", line 71, in load_and_execute
module = importlib.import_module(module_path)
File "/usr/local/Cellar/python@2.7.17/2.7.17_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0/lib/python2.7/site-packages/pants/bin/pants_exe.py", line 10, in <module>
from pants.base.exception_sink import ExceptionSink
File "/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0/lib/python2.7/site-packages/pants/base/exception_sink.py", line 18, in <module>
import setproctitle
ImportError: No module named setproctitle
hundreds-father-404
10/22/2020, 8:32 PMstraight-terabyte-91673
10/22/2020, 8:33 PMhundreds-father-404
10/22/2020, 8:35 PM./pants
script should have installed it for you when setting up a virtual environment to run Pants from.
Start by running rm -rf ~/.cache/pants/setup
, then ./pants
, to force redownloading Pants and all of its dependencies.straight-terabyte-91673
10/22/2020, 8:38 PMhundreds-father-404
10/22/2020, 8:42 PM~/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0/bin
(with some possible changes because I think we changed the naming scheme a few months ago)
In that folder, try running ~/.cache/.../bin/pip install setproctitle
and see what happens.straight-terabyte-91673
10/22/2020, 8:44 PMpip install setproctitle
Requirement already satisfied: setproctitle in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (1.1.10)
WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available.
You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.
hundreds-father-404
10/22/2020, 8:44 PMpip install setproctitle
, but ~/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0/bin/pip install setproctitle
, with the path fixed for what’s on your machinestraight-terabyte-91673
10/22/2020, 8:45 PM~/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0/bin/pip install setproctitle
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see <https://github.com/pypa/pip/issues/5599> for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
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.
Requirement already satisfied: setproctitle in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (1.1.10)
WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available.
You should consider upgrading via the '/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.EhXR1m/install/bin/python2.7 -m pip install --upgrade pip' command.
hundreds-father-404
10/22/2020, 8:47 PMDEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020.Yet then we see Py38
Requirement already satisfied: setproctitle in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
straight-terabyte-91673
10/22/2020, 8:48 PMhundreds-father-404
10/22/2020, 8:50 PM./pants
script if you run git log ./pants
? And is your copy the same as your coworkers?straight-terabyte-91673
10/22/2020, 8:52 PMhundreds-father-404
10/22/2020, 8:53 PMgit log ./pants
and tell me the date of when it was last changed? I’m trying to determine if y’all need to update your ./pants
script, which is something you have to manually do when we make changes to it.straight-terabyte-91673
10/22/2020, 8:57 PMWed Feb 26 13:06:07 2020 -0800
Summary:Combination of pants 1.15.0 + pytest 3.0.7 + freezegun 0.3.14 passes config test
hundreds-father-404
10/22/2020, 9:04 PMbootstrap-Darwin-x86_64/1.17.0/bin
is being set up. I would expect it to be 1.17.0_py36
. Can you please replace the ./pants
script with this: https://raw.githubusercontent.com/pantsbuild/setup/d1da382f6de0420940ec6007a39cba87c21075c6/pants
Then rm -rf ~/.cache/pants/setup
and run ./pants
?straight-terabyte-91673
10/22/2020, 9:09 PM/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0_py38/bin/python: can't open file '/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0_py38/bin/pants': [Errno 2] No such file or directory
happy-kitchen-89482
10/22/2020, 9:23 PM~/.cache/pants
(or at least there should be no harm in doing so). Or for safety just rename it and see what happens.hundreds-father-404
10/22/2020, 9:27 PMstraight-terabyte-91673
10/22/2020, 9:28 PMERROR: Command errored out with exit status 1:
command: /Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.YlaHPq/install/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2d/lfy8ywvx2fs1bmn5pq17cfkc0000gn/T/pip-install-trtplodv/cffi/setup.py'"'"'; __file__='"'"'/private/var/folders/2d/lfy8ywvx2fs1bmn5pq17cfkc0000gn/T/pip-install-trtplodv/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/2d/lfy8ywvx2fs1bmn5pq17cfkc0000gn/T/pip-wheel-s2ewanu_
cwd: /private/var/folders/2d/lfy8ywvx2fs1bmn5pq17cfkc0000gn/T/pip-install-trtplodv/cffi/
Complete output (59 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/error.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/model.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/api.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/commontypes.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/lock.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/recompiler.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/cparser.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/verifier.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/_embedding.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/c
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/ffi -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/ffi -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-10.9-x86_64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:4197:31: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
*p_printable_filename = PyText_AsUTF8(s);
^ ~~~~~~~~~~~~~~~~
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:20:30: error: incomplete definition of type 'struct _is'
builtins = tstate->interp->builtins;
~~~~~~~~~~~~~~^
/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:160:39: error: incomplete definition of type 'struct _is'
new1 = PyThreadState_GET()->interp->modules;
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:249:63: error: incomplete definition of type 'struct _is'
if (externpy->reserved1 != PyThreadState_GET()->interp->modules) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
^
1 warning and 3 errors generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cffi
ERROR: Command errored out with exit status 1:
command: /Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.YlaHPq/install/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2d/lfy8ywvx2fs1bmn5pq17cfkc0000gn/T/pip-install-trtplodv/cffi/setup.py'"'"'; __file__='"'"'/private/var/folders/2d/lfy8ywvx2fs1bmn5pq17cfkc0000gn/T/pip-install-trtplodv/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/2d/lfy8ywvx2fs1bmn5pq17cfkc0000gn/T/pip-record-qdvu99py/install-record.txt --single-version-externally-managed --compile --install-headers /Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.YlaHPq/install/include/site/python3.8/cffi
cwd: /private/var/folders/2d/lfy8ywvx2fs1bmn5pq17cfkc0000gn/T/pip-install-trtplodv/cffi/
Complete output (59 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/error.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/model.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/api.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/commontypes.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/lock.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/recompiler.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/cparser.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/verifier.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/_embedding.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/c
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/ffi -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/ffi -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-10.9-x86_64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:4197:31: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
*p_printable_filename = PyText_AsUTF8(s);
^ ~~~~~~~~~~~~~~~~
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:20:30: error: incomplete definition of type 'struct _is'
builtins = tstate->interp->builtins;
~~~~~~~~~~~~~~^
/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:160:39: error: incomplete definition of type 'struct _is'
new1 = PyThreadState_GET()->interp->modules;
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:249:63: error: incomplete definition of type 'struct _is'
if (externpy->reserved1 != PyThreadState_GET()->interp->modules) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
^
1 warning and 3 errors generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Can't roll back cffi; was not uninstalled
ERROR: Command errored out with exit status 1: /Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.YlaHPq/install/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2d/lfy8ywvx2fs1bmn5pq17cfkc0000gn/T/pip-install-trtplodv/cffi/setup.py'"'"'; __file__='"'"'/private/var/folders/2d/lfy8ywvx2fs1bmn5pq17cfkc0000gn/T/pip-install-trtplodv/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/2d/lfy8ywvx2fs1bmn5pq17cfkc0000gn/T/pip-record-qdvu99py/install-record.txt --single-version-externally-managed --compile --install-headers /Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.YlaHPq/install/include/site/python3.8/cffi Check the logs for full command output.
hundreds-father-404
10/22/2020, 9:32 PMcffi
.
What does which -a python
say? It looks like macOS system Python is being used, which is a bit broken.
Alternatively, I suspect an issue is using Py38 to run Pants. I’m not sure if that would work with 1.17.0 (it does with more recent). It’s possible that using Pyenv to install Py36 or Py37 and ensuring those are on your $PATH would fix this.straight-terabyte-91673
10/22/2020, 9:32 PMwhich -a python
/Users/jwong/houzz/c2dw/proctest/bin/python
/usr/local/bin/python
/usr/bin/python
hundreds-father-404
10/22/2020, 9:35 PMpyenv global
, e.g. pyenv global system 3.7.10 3.8.2
.
(FYI the issue is compiling the cffi
library.)brew install libffi
straight-terabyte-91673
10/22/2020, 9:41 PMTraceback (most recent call last):
File "/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0_py37/bin/pants", line 8, in <module>
sys.exit(main())
File "/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0_py37/lib/python3.7/site-packages/pants/bin/pants_loader.py", line 85, in main
PantsLoader.run()
File "/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0_py37/lib/python3.7/site-packages/pants/bin/pants_loader.py", line 81, in run
cls.load_and_execute(entrypoint)
File "/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0_py37/lib/python3.7/site-packages/pants/bin/pants_loader.py", line 71, in load_and_execute
module = importlib.import_module(module_path)
File "/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0_py37/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0_py37/lib/python3.7/site-packages/pants/bin/pants_exe.py", line 10, in <module>
from pants.base.exception_sink import ExceptionSink
File "/Users/jwong/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0_py37/lib/python3.7/site-packages/pants/base/exception_sink.py", line 18, in <module>
import setproctitle
ModuleNotFoundError: No module named 'setproctitle'
even after updating pants and installing py37 ><'hundreds-father-404
10/22/2020, 9:44 PMsetproctitle-1.1.10.dist-info/
and setproctitle.cpython-37m-darwin.so*
in ls ~/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0_py37/lib/python3.7/site-packages/
?straight-terabyte-91673
10/22/2020, 9:47 PMhundreds-father-404
10/22/2020, 9:48 PMsetproctitle
, for whatever reason. Try this again, but with the path fixed:
~/.cache/pants/setup/bootstrap-Darwin-x86_64/1.17.0/bin/pip install setproctitle
i think its still using py38, let me update the path of python3You can force it to use
python3.7
by setting the env var PYTHON=python3.7
or PYTHON=/path/to/python3.7
straight-terabyte-91673
10/22/2020, 10:09 PMhundreds-father-404
10/22/2020, 10:18 PM3.6 3.7 3.8 3.9
. Remove the versions you don’t wantstraight-terabyte-91673
10/22/2020, 10:55 PMhundreds-father-404
10/22/2020, 11:19 PMstraight-terabyte-91673
10/23/2020, 1:23 AM