https://pantsbuild.org/ logo
#general
Title
# general
s

straight-terabyte-91673

10/22/2020, 8:31 PM
Hello, I have been having trouble setting up pants on my computer, and this is the error: it seems im unable to import setproctitle even though ive verified on my local machine that it exists in both python2 and python3
Copy code
Traceback (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
h

hundreds-father-404

10/22/2020, 8:32 PM
Hi Jason! It looks like you’re using a really old version of Pants, 1.17.0. Is that what your org is already using?
s

straight-terabyte-91673

10/22/2020, 8:33 PM
yeah, we have it forked into one of our repos dedicated to our data warehouse
for our other devs it works but im not sure why my local doesn't
thx for giving me such a quick reply ^^
❤️ 1
h

hundreds-father-404

10/22/2020, 8:35 PM
I’m a little confused also, as the
./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.
s

straight-terabyte-91673

10/22/2020, 8:38 PM
Gotcha, let me try that now, ive tried removing the cache before, and usually the end of the installation of the dependencies throws the error.... ah yeah its the same error as i posted above hmmm
perhaps its my version of python as well?
h

hundreds-father-404

10/22/2020, 8:42 PM
Let’s try something more direct. You should have a directory like
~/.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.
s

straight-terabyte-91673

10/22/2020, 8:44 PM
Copy code
pip 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.
h

hundreds-father-404

10/22/2020, 8:44 PM
Not
pip 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 machine
s

straight-terabyte-91673

10/22/2020, 8:45 PM
i see
Copy code
~/.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.
h

hundreds-father-404

10/22/2020, 8:47 PM
Hm, that message is fishy. It looks like you’re using Py27
DEPRECATION: 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
s

straight-terabyte-91673

10/22/2020, 8:48 PM
perhaps its because my pip in pointing at python3.8 instead of python2.7?
h

hundreds-father-404

10/22/2020, 8:50 PM
Oh, something I’m surprised by is why Python 2.7 is being attempted at all. If you’re on Pants 1.17, then Pants should be being run with Python 3. https://groups.google.com/u/1/g/pants-devel/c/-bMRstFtMZU/m/TQRxtt24BQAJ (This might be different than what your own code is, it’s only what’s used for the tool) How recent is your version of the
./pants
script if you run
git log ./pants
? And is your copy the same as your coworkers?
s

straight-terabyte-91673

10/22/2020, 8:52 PM
yeah should be the same, i pulled the latest from master
h

hundreds-father-404

10/22/2020, 8:53 PM
Can you please run
git 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.
s

straight-terabyte-91673

10/22/2020, 8:57 PM
this was the last change:
Copy code
Wed 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
h

hundreds-father-404

10/22/2020, 9:04 PM
Thank you. It looks like your version of the script is stale, given how the folder
bootstrap-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
?
s

straight-terabyte-91673

10/22/2020, 9:09 PM
oh nice, trying it out now ~
🤞 1
oh interesting, besides all of the red output this is what i got at the end:
Copy code
/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
h

happy-kitchen-89482

10/22/2020, 9:23 PM
You might have to nuke all of
~/.cache/pants
(or at least there should be no harm in doing so). Or for safety just rename it and see what happens.
h

hundreds-father-404

10/22/2020, 9:27 PM
What is all the red output saying?
s

straight-terabyte-91673

10/22/2020, 9:28 PM
Copy code
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'"'"'))' 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.
the new virtual env is created successfully but the isnt in /bootstrap-Darwin-x86_64/1.17.0_py38/bin/pants
h

hundreds-father-404

10/22/2020, 9:32 PM
Thanks. That makes sense, as the installation is failing for the library
cffi
. 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.
s

straight-terabyte-91673

10/22/2020, 9:32 PM
Copy code
which -a python
/Users/jwong/houzz/c2dw/proctest/bin/python
/usr/local/bin/python
/usr/bin/python
yeah ill install Py37 with pyenv and see
🤞 1
👍 1
h

hundreds-father-404

10/22/2020, 9:35 PM
Cool, thanks. You’ll need to activate with
pyenv global
, e.g.
pyenv global system 3.7.10 3.8.2
. (FYI the issue is compiling the
cffi
library.)
Oh, speaking of that, try running
brew install libffi
s

straight-terabyte-91673

10/22/2020, 9:41 PM
oh my, i cant believe this LOL
Copy code
Traceback (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 ><'
😞 1
👎 1
ah yeah same error even after ive cleared cache and ran ./pants again
h

hundreds-father-404

10/22/2020, 9:44 PM
Grr, I’ve never seen something like that. Can you please verify that you see both
setproctitle-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/
?
s

straight-terabyte-91673

10/22/2020, 9:47 PM
i cant see setproctitle-1.1.10.dist-info/ nor setproctitle.cpython-37m-darwin.so* i think its still using py38, let me update the path of python3
h

hundreds-father-404

10/22/2020, 9:48 PM
Okay then that tells me it’s not installing
setproctitle
, 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 python3
You can force it to use
python3.7
by setting the env var
PYTHON=python3.7
or
PYTHON=/path/to/python3.7
s

straight-terabyte-91673

10/22/2020, 10:09 PM
omg thank you so much, it works now !
this whole python 2 and python 3 migration has been such a struggle, thanks so much everyone for ur support!
h

hundreds-father-404

10/22/2020, 10:18 PM
Yay! What was the fix? Forcing it to use python 3.7? Feel free to edit the pants script to force it to always do that. You’ll find a line with something like
3.6 3.7 3.8 3.9
. Remove the versions you don’t want
s

straight-terabyte-91673

10/22/2020, 10:55 PM
i think it was a number of issues, specifying pants to run on 2.7 but it was downloading dependencies to 3.8, thus when we forced it to use 3.7 for both, it fixed the issue I think the main painpoint is 1. the script was old and didn't specify to the user which python versions were being used and 2. my local python environment was a little bit weird, using pyenv def helps specify which to use thou
💯 1
h

hundreds-father-404

10/22/2020, 11:19 PM
Cool, thank you for the update! Btw, are you mostly using Pants for Python or other languages? We rebuilt the internals of Pants from the ground up based on the last 10 years of lessons, and the upcoming 2.0 release is substantially better. https://www.pantsbuild.org/docs/pants-v1-vs-v2
s

straight-terabyte-91673

10/23/2020, 1:23 AM
im mostly using it for python ^^
2 Views