I'm unable to install Pandas on FreeBSD 13.4 through pip for Python 3.10

We're trying to set up a new FreeBSD 13.4 server, and have run into some issues installing the Python packages we need. We saw a similar issue with NumPy, but were able to work around it by installing an older version. The server started at FreeBSD 13.0 and was immediately upgraded to 13.4. The Python version we are running is 3.10.14, we are trying to install Pandas version 2.2.3 and pip is at 24.2.

We have tried installing Pandas with the following command:
Code:
sudo python3.10 -m pip install pandas

Equivalent commands have succeeded for the other packages we need, so we expected this to work as well, but are seeing the following error:

Code:
Collecting pandas
  Using cached pandas-2.2.3.tar.gz (4.4 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [335 lines of output]
      Collecting meson-python==0.13.1
        Using cached meson_python-0.13.1-py3-none-any.whl.metadata (4.1 kB)
      Collecting meson==1.2.1
        Using cached meson-1.2.1-py3-none-any.whl.metadata (1.7 kB)
      Collecting wheel
        Using cached wheel-0.44.0-py3-none-any.whl.metadata (2.3 kB)
      Collecting Cython~=3.0.5
        Using cached Cython-3.0.11-py2.py3-none-any.whl.metadata (3.2 kB)
      Collecting numpy>=2.0
        Using cached numpy-2.1.1.tar.gz (18.9 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error

        × Preparing metadata (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [304 lines of output]
            + /usr/local/bin/python3.10 /tmp/pip-install-bltn0aj3/numpy_a1fdca0786c14938b2788c097daf84a8/vendored-meson/meson/meson.py setup /tmp/pip-install-bltn0aj3/numpy_a1fdca0786c14938b2788c097daf84a8 /tmp/pip-install-bltn0aj3/numpy_a1fdca0786c14938b2788c097daf84a8/.mesonpy-e9_twr0h -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-install-bltn0aj3/numpy_a1fdca0786c14938b2788c097daf84a8/.mesonpy-e9_twr0h/meson-python-native-file.ini
            The Meson build system
            Version: 1.4.99
            Source dir: /tmp/pip-install-bltn0aj3/numpy_a1fdca0786c14938b2788c097daf84a8
            Build dir: /tmp/pip-install-bltn0aj3/numpy_a1fdca0786c14938b2788c097daf84a8/.mesonpy-e9_twr0h
            Build type: native build
            Project name: NumPy
            Project version: 2.1.1
            C compiler for the host machine: cc (clang 18.1.6 "FreeBSD clang version 18.1.6 (https://github.com/llvm/llvm-project.git llvmorg-18.1.6-0-g1118c2e05e67)")
            C linker for the host machine: cc ld.lld 18.1.6
            C++ compiler for the host machine: c++ (clang 18.1.6 "FreeBSD clang version 18.1.6 (https://github.com/llvm/llvm-project.git llvmorg-18.1.6-0-g1118c2e05e67)")
            C++ linker for the host machine: c++ ld.lld 18.1.6
            Cython compiler for the host machine: cython (cython 3.0.11)
            Host machine cpu family: x86_64
            Host machine cpu: x86_64
            Program python found: YES (/usr/local/bin/python3.10)
            Found pkg-config: YES (/usr/local/bin/pkg-config) 2.2.0
            Run-time dependency python found: YES 3.10
            Has header "Python.h" with dependency python-3.10: YES
            Compiler for C supports arguments -fno-strict-aliasing: YES
            Compiler for C supports arguments -ftrapping-math: YES
            Test features "SSE SSE2 SSE3" : Supported
            Test features "SSSE3" : Supported
            Test features "SSE41" : Supported
            Test features "POPCNT" : Supported
            Test features "SSE42" : Supported
            Test features "AVX" : Supported
            Test features "F16C" : Supported
            Test features "FMA3" : Supported
            Test features "AVX2" : Supported
            Test features "AVX512F" : Supported
            Test features "AVX512CD" : Supported
            Test features "AVX512_KNL" : Supported
            Test features "AVX512_KNM" : Unsupported due to Arguments "-msse, -msse2, -msse3, -mssse3, -msse4.1, -mpopcnt, -msse4.2, -mavx, -mf16c, -mfma, -mavx2, -maes, -mpclmul, -mbmi, -mbmi2, -mno-mmx, -mavx512f, -mavx512cd, -mavx512er, -mavx512pf, -mavx5124fmaps, -mavx5124vnniw, -mavx512vpopcntdq" are not supported
            Test features "AVX512_SKX" : Supported
            Test features "AVX512_CLX" : Supported
            Test features "AVX512_CNL" : Supported
            Test features "AVX512_ICL" : Supported
            Test features "AVX512_SPR" : Unsupported due to Compiler fails against the test code of "AVX512_SPR"
            Configuring npy_cpu_dispatch_config.h using configuration
            Message:
            CPU Optimization Options
              baseline:
                Requested : min
                Enabled   : SSE SSE2 SSE3
              dispatch:
                Requested : max -xop -fma4
                Enabled   : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL

            Library m found: YES
            Run-time dependency scipy-openblas found: NO (tried pkgconfig)
            Run-time dependency mkl found: NO (tried pkgconfig and system)
            Run-time dependency mkl found: NO (tried pkgconfig and system)
            Run-time dependency openblas found: YES 0.3.27
            Message: BLAS symbol suffix:
            Run-time dependency mkl found: NO (tried pkgconfig and system)
            Run-time dependency openblas found: YES 0.3.27
            Checking if "Check atomic builtins without -latomic" : links: NO
            Library atomic found: NO
            Program _build_utils/process_src_template.py found: YES (/usr/local/bin/python3.10 /tmp/pip-install-bltn0aj3/numpy_a1fdca0786c14938b2788c097daf84a8/numpy/_build_utils/process_src_template.py)
            Program _build_utils/tempita.py found: YES (/usr/local/bin/python3.10 /tmp/pip-install-bltn0aj3/numpy_a1fdca0786c14938b2788c097daf84a8/numpy/_build_utils/tempita.py)
            Configuring __config__.py using configuration
            Checking for size of "short" : 2
            Checking for size of "int" : 4
            Checking for size of "long" : 8
            Checking for size of "long long" : 8
            Checking for size of "float" : 4
            Checking for size of "double" : 8
            Checking for size of "long double" : 16
            Checking for size of "size_t" : 8
            Checking for size of "size_t" : 8 (cached)
            Checking for size of "wchar_t" : 4
            Checking for size of "off_t" : 8
            Checking for size of "Py_intptr_t" with dependency python-3.10: 8
            Checking for size of "PY_LONG_LONG" with dependency python-3.10: 8
            Has header "complex.h" : YES
            Checking for type "complex float" : YES
            Checking for size of "complex float" : 8
            Checking for type "complex double" : YES
            Checking for size of "complex double" : 16
            Checking for type "complex long double" : YES
            Checking for size of "complex long double" : 32
            Checking for function "sin" with dependency -lm: YES
            Checking for function "cos" with dependency -lm: YES
            Checking for function "tan" with dependency -lm: YES
            Checking for function "sinh" with dependency -lm: YES
            Checking for function "cosh" with dependency -lm: YES
            Checking for function "tanh" with dependency -lm: YES
            Checking for function "fabs" with dependency -lm: YES
            Checking for function "floor" with dependency -lm: YES
            Checking for function "ceil" with dependency -lm: YES
            Checking for function "sqrt" with dependency -lm: YES
            Checking for function "log10" with dependency -lm: YES
            Checking for function "log" with dependency -lm: YES
            Checking for function "exp" with dependency -lm: YES
            Checking for function "asin" with dependency -lm: YES
            Checking for function "acos" with dependency -lm: YES
            Checking for function "atan" with dependency -lm: YES
            Checking for function "fmod" with dependency -lm: YES
            Checking for function "modf" with dependency -lm: YES
            Checking for function "frexp" with dependency -lm: YES
            Checking for function "ldexp" with dependency -lm: YES
            Checking for function "expm1" with dependency -lm: YES
            Checking for function "log1p" with dependency -lm: YES
            Checking for function "acosh" with dependency -lm: YES
            Checking for function "asinh" with dependency -lm: YES
            Checking for function "atanh" with dependency -lm: YES
            Checking for function "rint" with dependency -lm: YES
            Checking for function "trunc" with dependency -lm: YES
            Checking for function "exp2" with dependency -lm: YES
            Checking for function "copysign" with dependency -lm: YES
            Checking for function "nextafter" with dependency -lm: YES
            Checking for function "cbrt" with dependency -lm: YES
            Checking for function "log2" with dependency -lm: YES
            Checking for function "pow" with dependency -lm: YES
            Checking for function "hypot" with dependency -lm: YES
            Checking for function "atan2" with dependency -lm: YES
            Checking for function "csin" with dependency -lm: YES
            Checking for function "csinh" with dependency -lm: YES
            Checking for function "ccos" with dependency -lm: YES
            Checking for function "ccosh" with dependency -lm: YES
            Checking for function "ctan" with dependency -lm: YES
            Checking for function "ctanh" with dependency -lm: YES
            Checking for function "creal" with dependency -lm: YES
            Checking for function "cimag" with dependency -lm: YES
            Checking for function "conj" with dependency -lm: YES
            Checking for function "strtoll" : YES
            Checking for function "strtoull" : YES
            Checking for function "cabs" with dependency -lm: YES
            Checking for function "cabsf" with dependency -lm: YES
            Checking for function "cabsl" with dependency -lm: YES
            Checking for function "cacos" with dependency -lm: YES
            Checking for function "cacosf" with dependency -lm: YES
            Checking for function "cacosl" with dependency -lm: YES
            Checking for function "cacosh" with dependency -lm: YES
            Checking for function "cacoshf" with dependency -lm: YES
            Checking for function "cacoshl" with dependency -lm: YES
            Checking for function "carg" with dependency -lm: YES
            Checking for function "cargf" with dependency -lm: YES
            Checking for function "cargl" with dependency -lm: YES
            Checking for function "casin" with dependency -lm: YES
            Checking for function "casinf" with dependency -lm: YES
            Checking for function "casinl" with dependency -lm: YES
            Checking for function "casinh" with dependency -lm: YES
            Checking for function "casinhf" with dependency -lm: YES
            Checking for function "casinhl" with dependency -lm: YES
            Checking for function "catan" with dependency -lm: YES
            Checking for function "catanf" with dependency -lm: YES
            Checking for function "catanl" with dependency -lm: YES
            Checking for function "catanh" with dependency -lm: YES
            Checking for function "catanhf" with dependency -lm: YES
            Checking for function "catanhl" with dependency -lm: YES
            Checking for function "cexp" with dependency -lm: YES
            Checking for function "cexpf" with dependency -lm: YES
            Checking for function "cexpl" with dependency -lm: YES
            Checking for function "clog" with dependency -lm: YES
            Checking for function "clogf" with dependency -lm: YES
            Checking for function "clogl" with dependency -lm: YES
            Checking for function "cpow" with dependency -lm: YES
            Checking for function "cpowf" with dependency -lm: YES
            Checking for function "cpowl" with dependency -lm: YES
            Checking for function "csqrt" with dependency -lm: YES
            Checking for function "csqrtf" with dependency -lm: YES
            Checking for function "csqrtl" with dependency -lm: YES
            Checking for function "csin" with dependency -lm: YES (cached)
            Checking for function "csinf" with dependency -lm: YES
            Checking for function "csinl" with dependency -lm: NO
            Checking for function "csinh" with dependency -lm: YES (cached)
            Checking for function "csinhf" with dependency -lm: YES
            Checking for function "csinhl" with dependency -lm: NO
            Checking for function "ccos" with dependency -lm: YES (cached)
            Checking for function "ccosf" with dependency -lm: YES
            Checking for function "ccosl" with dependency -lm: NO
            Checking for function "ccosh" with dependency -lm: YES (cached)
            Checking for function "ccoshf" with dependency -lm: YES
            Checking for function "ccoshl" with dependency -lm: NO
            Checking for function "ctan" with dependency -lm: YES (cached)
            Checking for function "ctanf" with dependency -lm: YES
            Checking for function "ctanl" with dependency -lm: NO
            Checking for function "ctanh" with dependency -lm: YES (cached)
            Checking for function "ctanhf" with dependency -lm: YES
            Checking for function "ctanhl" with dependency -lm: NO
            Checking for function "isfinite" with dependency -lm: YES
            Header "Python.h" has symbol "isfinite" with dependency python-3.10: YES
            Checking for function "isinf" with dependency -lm: YES
            Header "Python.h" has symbol "isinf" with dependency python-3.10: YES
            Checking for function "isnan" with dependency -lm: YES
            Header "Python.h" has symbol "isnan" with dependency python-3.10: YES
            Checking for function "signbit" with dependency -lm: YES
            Header "Python.h" has symbol "signbit" with dependency python-3.10: YES
            Checking if "thread_local" compiles: NO
            Checking if "_Thread_local" compiles: YES
            Checking if "__thread" compiles: YES
            Checking if "__declspec(thread)" compiles: NO
            Checking for function "fallocate" : NO
            Header "Python.h" has symbol "HAVE_FTELLO" with dependency python-3.10: YES
            Header "Python.h" has symbol "HAVE_FSEEKO" with dependency python-3.10: YES
            Checking for function "backtrace" : NO
            Checking for function "madvise" : YES
            Has header "features.h" : NO
            Has header "xlocale.h" : YES
            Has header "dlfcn.h" : YES
            Has header "execinfo.h" : YES
            Has header "libunwind.h" : YES
            Has header "sys/mman.h" : YES
            Checking for function "strtold_l" : YES
            Compiler for C supports arguments -O3: YES
            Has header "endian.h" : YES
            Has header "sys/endian.h" : YES
            Compiler for C supports function attribute visibility:hidden: YES
            Configuring config.h using configuration
            Configuring _numpyconfig.h using configuration
            Configuring npymath.ini using configuration
            Configuring mlib.ini using configuration
            Configuring numpy.pc using configuration
            Generating multi-targets for "_umath_tests.dispatch.h"
              Enabled targets: AVX2, SSE41, baseline
            Generating multi-targets for "argfunc.dispatch.h"
              Enabled targets: AVX512_SKX, AVX2, SSE42, baseline
            Generating multi-targets for "x86_simd_argsort.dispatch.h"
              Enabled targets: AVX512_SKX, AVX2
            Generating multi-targets for "x86_simd_qsort.dispatch.h"
              Enabled targets: AVX512_SKX, AVX2
            Generating multi-targets for "x86_simd_qsort_16bit.dispatch.h"
              Enabled targets: AVX512_ICL
            Generating multi-targets for "highway_qsort.dispatch.h"
              Enabled targets:
            Generating multi-targets for "highway_qsort_16bit.dispatch.h"
              Enabled targets:
            Generating multi-targets for "loops_arithm_fp.dispatch.h"
              Enabled targets: AVX2, baseline
            Generating multi-targets for "loops_arithmetic.dispatch.h"
              Enabled targets: AVX512_SKX, AVX512F, AVX2, SSE41, baseline
            Generating multi-targets for "loops_comparison.dispatch.h"
              Enabled targets: AVX512_SKX, AVX512F, AVX2, SSE42, baseline
            Generating multi-targets for "loops_exponent_log.dispatch.h"
              Enabled targets: AVX512_SKX, AVX512F, AVX2, baseline
            Generating multi-targets for "loops_hyperbolic.dispatch.h"
              Enabled targets: AVX512_SKX, AVX2, baseline
            Generating multi-targets for "loops_logical.dispatch.h"
              Enabled targets: AVX512_SKX, AVX2, baseline
            Generating multi-targets for "loops_minmax.dispatch.h"
              Enabled targets: AVX512_SKX, AVX2, baseline
            Generating multi-targets for "loops_modulo.dispatch.h"
              Enabled targets: baseline
            Generating multi-targets for "loops_trigonometric.dispatch.h"
              Enabled targets: AVX512_SKX, AVX2, baseline
            Generating multi-targets for "loops_umath_fp.dispatch.h"
              Enabled targets: AVX512_SKX, baseline
            Generating multi-targets for "loops_unary.dispatch.h"
              Enabled targets: AVX512_SKX, AVX2, baseline
            Generating multi-targets for "loops_unary_fp.dispatch.h"
              Enabled targets: SSE41, baseline
            Generating multi-targets for "loops_unary_fp_le.dispatch.h"
              Enabled targets: SSE41, baseline
            Generating multi-targets for "loops_unary_complex.dispatch.h"
              Enabled targets: AVX512F, AVX2, baseline
            Generating multi-targets for "loops_autovec.dispatch.h"
              Enabled targets: AVX2, baseline
            Generating multi-targets for "_simd.dispatch.h"
              Enabled targets: SSE42, AVX2, FMA3, AVX512F, AVX512_SKX, baseline
            Build targets in project: 103

            NumPy 2.1.1

              User defined options
                Native files: /tmp/pip-install-bltn0aj3/numpy_a1fdca0786c14938b2788c097daf84a8/.mesonpy-e9_twr0h/meson-python-native-file.ini
                buildtype   : release
                b_ndebug    : if-release
                b_vscrt     : md

            Found ninja-1.11.1 at /usr/local/bin/ninja
            + /usr/local/bin/ninja
            [1/512] Copying file numpy/__init__.py
            [2/512] Copying file numpy/__init__.pxd
            [3/512] Copying file numpy/__init__.cython-30.pxd
            [4/512] Generating numpy/_core/npy_math_internal.h with a custom command
            [5/512] Generating 'numpy/_core/libnpymath.a.p/ieee754.c'
            [6/512] Generating 'numpy/_core/libnpymath.a.p/npy_math_complex.c'
            [7/512] Compiling C object numpy/_core/libnpymath.a.p/meson-generated_ieee754.c.o
            [8/512] Compiling C++ object numpy/_core/libhighway.a.p/src_highway_hwy_abort.cc.o
            FAILED: numpy/_core/libhighway.a.p/src_highway_hwy_abort.cc.o
            c++ -Inumpy/_core/libhighway.a.p -Inumpy/_core -I../numpy/_core -I../numpy/_core/src/highway -I/tmp/pip-install-bltn0aj3/numpy_a1fdca0786c14938b2788c097daf84a8/.mesonpy-e9_twr0h/meson_cpu -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -O3 -ftrapping-math -DNPY_HAVE_CLANG_FPSTRICT -msse -msse2 -msse3 -DNPY_HAVE_SSE2 -DNPY_HAVE_SSE -DNPY_HAVE_SSE3 -fPIC -DTOOLCHAIN_MISS_ASM_HWCAP_H -MD -MQ numpy/_core/libhighway.a.p/src_highway_hwy_abort.cc.o -MF numpy/_core/libhighway.a.p/src_highway_hwy_abort.cc.o.d -o numpy/_core/libhighway.a.p/src_highway_hwy_abort.cc.o -c ../numpy/_core/src/highway/hwy/abort.cc
            In file included from ../numpy/_core/src/highway/hwy/abort.cc:12:
            In file included from /usr/include/c++/v1/string:573:
            In file included from /usr/include/c++/v1/__algorithm/remove.h:12:
            /usr/include/c++/v1/__algorithm/find.h:23:10: fatal error: '__string/constexpr_c_functions.h' file not found
               23 | #include <__string/constexpr_c_functions.h>
                  |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            1 error generated.
            [9/512] Compiling C object numpy/_core/libnpymath.a.p/meson-generated_npy_math_complex.c.o
            [10/512] Compiling C++ object numpy/_core/libnpymath.a.p/src_npymath_halffloat.cpp.o
            FAILED: numpy/_core/libnpymath.a.p/src_npymath_halffloat.cpp.o
            c++ -Inumpy/_core/libnpymath.a.p -Inumpy/_core -I../numpy/_core -Inumpy/_core/include -I../numpy/_core/include -I../numpy/_core/src/npymath -I../numpy/_core/src/common -I/usr/local/include/python3.10 -I/tmp/pip-install-bltn0aj3/numpy_a1fdca0786c14938b2788c097daf84a8/.mesonpy-e9_twr0h/meson_cpu -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -O3 -ftrapping-math -DNPY_HAVE_CLANG_FPSTRICT -msse -msse2 -msse3 -DNPY_HAVE_SSE2 -DNPY_HAVE_SSE -DNPY_HAVE_SSE3 -fPIC -MD -MQ numpy/_core/libnpymath.a.p/src_npymath_halffloat.cpp.o -MF numpy/_core/libnpymath.a.p/src_npymath_halffloat.cpp.o.d -o numpy/_core/libnpymath.a.p/src_npymath_halffloat.cpp.o -c ../numpy/_core/src/npymath/halffloat.cpp
            In file included from ../numpy/_core/src/npymath/halffloat.cpp:12:
            In file included from ../numpy/_core/src/common/common.hpp:9:
            In file included from ../numpy/_core/src/common/npstd.hpp:9:
            In file included from /usr/include/c++/v1/string:573:
            In file included from /usr/include/c++/v1/__algorithm/remove.h:12:
            /usr/include/c++/v1/__algorithm/find.h:23:10: fatal error: '__string/constexpr_c_functions.h' file not found
               23 | #include <__string/constexpr_c_functions.h>
                  |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            1 error generated.
            ninja: build stopped: subcommand failed.
            [end of output]

Looking around, it seems that this issue with these missing files may be related to various build tools, but as far as I am aware we have them installed. We have tried installing older versions, which worked when we faced a similar issue installing NumPy, but have had no luck. I'm quite new to this kind of thing so if there are any details you may need that I've missed, please let me know. Any further pointers would be greatly appreciated!
 
/usr/include/c++/v1/__algorithm/remove.h:12

On my system this file does not include anything related to <__string/constexpr_c_functions.h>. Maybe it is outdated.

What is the timestamp on the various /usr/include/c++/v1/ files from the error message?
 
/usr/include/c++/v1/__algorithm/remove.h:12

On my system this file does not include anything related to <__string/constexpr_c_functions.h>. Maybe it is outdated.

What is the timestamp on the various /usr/include/c++/v1/ files from the error message?
All the files I have in there have a timestamp of 13:49 on October 1, which I believe would be when I ran the upgrade from FreeBSD 13.0 to 13.4. I'll also note that the entire folder __string/ does not exist, if that's helpful.
 
I mis-spoke. On 13.3 and 13.4 I have this directory:
Code:
% ls /usr/include/./c++/v1/__string
char_traits.h                   extern_template_lists.h
constexpr_c_functions.h
 
I mis-spoke. On 13.3 and 13.4 I have this directory:
Code:
% ls /usr/include/./c++/v1/__string
char_traits.h                   extern_template_lists.h
constexpr_c_functions.h
Strange, I don't have that directory at all. I understand that these files are related to the LLVM package, which version are you on?
 
My python is at 3.11.9
python -m pip install pandas,
without sudo works fine.

Note from packages i have also installed,
py311-pandas-2.0.3_2,1 Flexible, high-performance data analysis in Python

So there was no need to do pip.
 
Why not use the port/package? Slightly older version though: math/py-pandas. And there's no Python 3.10 flavor for it. But building from ports should work if you set DEFAULT_VERSIONS+= python=3.10 in /etc/make.conf.
 
But building from ports should work if you set DEFAULT_VERSIONS+= python=3.10 in /etc/make.conf.
Ports entirely skipped python 3.10 so I'd not be surprised if you'll hit a wall of some sort.
Not saying it's a problem - just throwing this out there.
 
My python is at 3.11.9
python -m pip install pandas,
without sudo works fine.

Note from packages i have also installed,
py311-pandas-2.0.3_2,1 Flexible, high-performance data analysis in Python

So there was no need to do pip.
When I try pip install (specifying 3.10) without sudo, I just get the following error:
Code:
/usr/local/bin/python3.10: No module named pip.__main__; 'pip' is a package and cannot be directly executed
I've tried running
Code:
python3.10 -m ensurepip
to make sure pip is properly set up without sudo, but get the following:
Code:
Defaulting to user installation because normal site-packages is not writeable
ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
    status = run_func(*args)
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_internal/cli/req_command.py", line 247, in wrapper
    return func(self, options, args)
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_internal/commands/install.py", line 345, in run
    session = self.get_default_session(options)
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_internal/cli/req_command.py", line 98, in get_default_session
    self._session = self.enter_context(self._build_session(options))
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_internal/cli/req_command.py", line 125, in _build_session
    session = PipSession(
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_internal/network/session.py", line 343, in __init__
    self.headers["User-Agent"] = user_agent()
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_internal/network/session.py", line 175, in user_agent
    setuptools_dist = get_default_environment().get_distribution("setuptools")
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_internal/metadata/__init__.py", line 75, in get_default_environment
    return select_backend().Environment.default()
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_internal/metadata/__init__.py", line 63, in select_backend
    from . import pkg_resources
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_internal/metadata/pkg_resources.py", line 8, in <module>
    from pip._vendor import pkg_resources
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3252, in <module>
    def _initialize_master_working_set():
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 574, in _build_master
    ws = cls()
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 567, in __init__
    self.add_entry(entry)
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 623, in add_entry
    for dist in find_distributions(entry, True):
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2065, in find_on_path
    for dist in factory(fullpath):
  File "/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 2127, in distributions_from_metadata
    if len(os.listdir(path)) == 0:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.10/site-packages/zc.lockfile-3.0.post1.dist-info'
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.10/ensurepip/__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
  File "/usr/local/lib/python3.10/ensurepip/__init__.py", line 287, in _main
    return _bootstrap(
  File "/usr/local/lib/python3.10/ensurepip/__init__.py", line 203, in _bootstrap
    return _run_pip([*args, *_PACKAGE_NAMES], additional_paths)
  File "/usr/local/lib/python3.10/ensurepip/__init__.py", line 104, in _run_pip
    return subprocess.run(cmd, check=True).returncode
  File "/usr/local/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/local/bin/python3.10', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmp1tka6mvc/setuptools-65.5.0-py3-none-any.whl\', \'/tmp/tmp1tka6mvc/pip-23.0.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmp1tka6mvc\', \'setuptools\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 2.
 
Back
Top