25077667 / standalone-python

A portable standalone python for all Linux platform
Other
29 stars 9 forks source link

env seem isnt loaded #7

Open ForteDexe opened 2 weeks ago

ForteDexe commented 2 weeks ago

Hi, I am facing this issue, let me know what I can help debug

./Resources/opt/python/bin/python -m pip install ipykernel     
Collecting ipykernel
  Obtaining dependency information for ipykernel from https://files.pythonhosted.org/packages/94/5c/368ae6c01c7628438358e6d337c19b05425727fbb221d2a3c4303c372f42/ipykernel-6.29.5-py3-none-any.whl.metadata
  Using cached ipykernel-6.29.5-py3-none-any.whl.metadata (6.3 kB)
Collecting comm>=0.1.1 (from ipykernel)
  Obtaining dependency information for comm>=0.1.1 from https://files.pythonhosted.org/packages/e6/75/49e5bfe642f71f272236b5b2d2691cf915a7283cc0ceda56357b61daa538/comm-0.2.2-py3-none-any.whl.metadata
  Using cached comm-0.2.2-py3-none-any.whl.metadata (3.7 kB)
Collecting debugpy>=1.6.5 (from ipykernel)
  Obtaining dependency information for debugpy>=1.6.5 from https://files.pythonhosted.org/packages/03/99/ec2190d03df5dbd610418919bd1c3d8e6f61d0a97894e11ade6d3260cfb8/debugpy-1.8.8-py2.py3-none-any.whl.metadata
  Using cached debugpy-1.8.8-py2.py3-none-any.whl.metadata (1.1 kB)
Collecting ipython>=7.23.1 (from ipykernel)
  Obtaining dependency information for ipython>=7.23.1 from https://files.pythonhosted.org/packages/c5/a5/c15ed187f1b3fac445bb42a2dedd8dec1eee1718b35129242049a13a962f/ipython-8.29.0-py3-none-any.whl.metadata
  Using cached ipython-8.29.0-py3-none-any.whl.metadata (5.0 kB)
Collecting jupyter-client>=6.1.12 (from ipykernel)
  Obtaining dependency information for jupyter-client>=6.1.12 from https://files.pythonhosted.org/packages/11/85/b0394e0b6fcccd2c1eeefc230978a6f8cb0c5df1e4cd3e7625735a0d7d1e/jupyter_client-8.6.3-py3-none-any.whl.metadata
  Using cached jupyter_client-8.6.3-py3-none-any.whl.metadata (8.3 kB)
Collecting jupyter-core!=5.0.*,>=4.12 (from ipykernel)
  Obtaining dependency information for jupyter-core!=5.0.*,>=4.12 from https://files.pythonhosted.org/packages/c9/fb/108ecd1fe961941959ad0ee4e12ee7b8b1477247f30b1fdfd83ceaf017f0/jupyter_core-5.7.2-py3-none-any.whl.metadata
  Using cached jupyter_core-5.7.2-py3-none-any.whl.metadata (3.4 kB)
Collecting matplotlib-inline>=0.1 (from ipykernel)
  Obtaining dependency information for matplotlib-inline>=0.1 from https://files.pythonhosted.org/packages/8f/8e/9ad090d3553c280a8060fbf6e24dc1c0c29704ee7d1c372f0c174aa59285/matplotlib_inline-0.1.7-py3-none-any.whl.metadata
  Using cached matplotlib_inline-0.1.7-py3-none-any.whl.metadata (3.9 kB)
Collecting nest-asyncio (from ipykernel)
  Obtaining dependency information for nest-asyncio from https://files.pythonhosted.org/packages/a0/c4/c2971a3ba4c6103a3d10c4b0f24f461ddc027f0f09763220cf35ca1401b3/nest_asyncio-1.6.0-py3-none-any.whl.metadata
  Using cached nest_asyncio-1.6.0-py3-none-any.whl.metadata (2.8 kB)
Collecting packaging (from ipykernel)
  Obtaining dependency information for packaging from https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl.metadata
  Using cached packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
Collecting psutil (from ipykernel)
  Using cached psutil-6.1.0.tar.gz (508 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pyzmq>=24 (from ipykernel)
  Obtaining dependency information for pyzmq>=24 from https://files.pythonhosted.org/packages/85/4f/01711edaa58d535eac4a26c294c617c9a01f09857c0ce191fd574d06f359/pyzmq-26.2.0-cp312-cp312-musllinux_1_1_x86_64.whl.metadata
  Using cached pyzmq-26.2.0-cp312-cp312-musllinux_1_1_x86_64.whl.metadata (6.2 kB)
Collecting tornado>=6.1 (from ipykernel)
  Obtaining dependency information for tornado>=6.1 from https://files.pythonhosted.org/packages/94/d4/f8ac1f5bd22c15fad3b527e025ce219bd526acdbd903f52053df2baecc8b/tornado-6.4.1-cp38-abi3-musllinux_1_2_x86_64.whl.metadata
  Using cached tornado-6.4.1-cp38-abi3-musllinux_1_2_x86_64.whl.metadata (2.5 kB)
Collecting traitlets>=5.4.0 (from ipykernel)
  Obtaining dependency information for traitlets>=5.4.0 from https://files.pythonhosted.org/packages/00/c0/8f5d070730d7836adc9c9b6408dec68c6ced86b304a9b26a14df072a6e8c/traitlets-5.14.3-py3-none-any.whl.metadata
  Using cached traitlets-5.14.3-py3-none-any.whl.metadata (10 kB)
Collecting decorator (from ipython>=7.23.1->ipykernel)
  Obtaining dependency information for decorator from https://files.pythonhosted.org/packages/d5/50/83c593b07763e1161326b3b8c6686f0f4b0f24d5526546bee538c89837d6/decorator-5.1.1-py3-none-any.whl.metadata
  Using cached decorator-5.1.1-py3-none-any.whl.metadata (4.0 kB)
Collecting jedi>=0.16 (from ipython>=7.23.1->ipykernel)
  Obtaining dependency information for jedi>=0.16 from https://files.pythonhosted.org/packages/20/9f/bc63f0f0737ad7a60800bfd472a4836661adae21f9c2535f3957b1e54ceb/jedi-0.19.1-py2.py3-none-any.whl.metadata
  Using cached jedi-0.19.1-py2.py3-none-any.whl.metadata (22 kB)
Collecting prompt-toolkit<3.1.0,>=3.0.41 (from ipython>=7.23.1->ipykernel)
  Obtaining dependency information for prompt-toolkit<3.1.0,>=3.0.41 from https://files.pythonhosted.org/packages/a9/6a/fd08d94654f7e67c52ca30523a178b3f8ccc4237fce4be90d39c938a831a/prompt_toolkit-3.0.48-py3-none-any.whl.metadata
  Using cached prompt_toolkit-3.0.48-py3-none-any.whl.metadata (6.4 kB)
Collecting pygments>=2.4.0 (from ipython>=7.23.1->ipykernel)
  Obtaining dependency information for pygments>=2.4.0 from https://files.pythonhosted.org/packages/f7/3f/01c8b82017c199075f8f788d0d906b9ffbbc5a47dc9918a945e13d5a2bda/pygments-2.18.0-py3-none-any.whl.metadata
  Using cached pygments-2.18.0-py3-none-any.whl.metadata (2.5 kB)
Collecting stack-data (from ipython>=7.23.1->ipykernel)
  Obtaining dependency information for stack-data from https://files.pythonhosted.org/packages/f1/7b/ce1eafaf1a76852e2ec9b22edecf1daa58175c090266e9f6c64afcd81d91/stack_data-0.6.3-py3-none-any.whl.metadata
  Using cached stack_data-0.6.3-py3-none-any.whl.metadata (18 kB)
Collecting pexpect>4.3 (from ipython>=7.23.1->ipykernel)
  Obtaining dependency information for pexpect>4.3 from https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl.metadata
  Using cached pexpect-4.9.0-py2.py3-none-any.whl.metadata (2.5 kB)
Collecting python-dateutil>=2.8.2 (from jupyter-client>=6.1.12->ipykernel)
  Obtaining dependency information for python-dateutil>=2.8.2 from https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata
  Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting platformdirs>=2.5 (from jupyter-core!=5.0.*,>=4.12->ipykernel)
  Obtaining dependency information for platformdirs>=2.5 from https://files.pythonhosted.org/packages/3c/a6/bc1012356d8ece4d66dd75c4b9fc6c1f6650ddd5991e421177d9f8f671be/platformdirs-4.3.6-py3-none-any.whl.metadata
  Using cached platformdirs-4.3.6-py3-none-any.whl.metadata (11 kB)
Collecting parso<0.9.0,>=0.8.3 (from jedi>=0.16->ipython>=7.23.1->ipykernel)
  Obtaining dependency information for parso<0.9.0,>=0.8.3 from https://files.pythonhosted.org/packages/c6/ac/dac4a63f978e4dcb3c6d3a78c4d8e0192a113d288502a1216950c41b1027/parso-0.8.4-py2.py3-none-any.whl.metadata
  Using cached parso-0.8.4-py2.py3-none-any.whl.metadata (7.7 kB)
Collecting ptyprocess>=0.5 (from pexpect>4.3->ipython>=7.23.1->ipykernel)
  Obtaining dependency information for ptyprocess>=0.5 from https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl.metadata
  Using cached ptyprocess-0.7.0-py2.py3-none-any.whl.metadata (1.3 kB)
Collecting wcwidth (from prompt-toolkit<3.1.0,>=3.0.41->ipython>=7.23.1->ipykernel)
  Obtaining dependency information for wcwidth from https://files.pythonhosted.org/packages/fd/84/fd2ba7aafacbad3c4201d395674fc6348826569da3c0937e75505ead3528/wcwidth-0.2.13-py2.py3-none-any.whl.metadata
  Using cached wcwidth-0.2.13-py2.py3-none-any.whl.metadata (14 kB)
Collecting six>=1.5 (from python-dateutil>=2.8.2->jupyter-client>=6.1.12->ipykernel)
  Obtaining dependency information for six>=1.5 from https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl.metadata
  Using cached six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
Collecting executing>=1.2.0 (from stack-data->ipython>=7.23.1->ipykernel)
  Obtaining dependency information for executing>=1.2.0 from https://files.pythonhosted.org/packages/b5/fd/afcd0496feca3276f509df3dbd5dae726fcc756f1a08d9e25abe1733f962/executing-2.1.0-py2.py3-none-any.whl.metadata
  Using cached executing-2.1.0-py2.py3-none-any.whl.metadata (8.9 kB)
Collecting asttokens>=2.1.0 (from stack-data->ipython>=7.23.1->ipykernel)
  Obtaining dependency information for asttokens>=2.1.0 from https://files.pythonhosted.org/packages/45/86/4736ac618d82a20d87d2f92ae19441ebc7ac9e7a581d7e58bbe79233b24a/asttokens-2.4.1-py2.py3-none-any.whl.metadata
  Using cached asttokens-2.4.1-py2.py3-none-any.whl.metadata (5.2 kB)
Collecting pure-eval (from stack-data->ipython>=7.23.1->ipykernel)
  Obtaining dependency information for pure-eval from https://files.pythonhosted.org/packages/8e/37/efad0257dc6e593a18957422533ff0f87ede7c9c6ea010a2177d738fb82f/pure_eval-0.2.3-py3-none-any.whl.metadata
  Using cached pure_eval-0.2.3-py3-none-any.whl.metadata (6.3 kB)
Using cached ipykernel-6.29.5-py3-none-any.whl (117 kB)
Using cached comm-0.2.2-py3-none-any.whl (7.2 kB)
Using cached debugpy-1.8.8-py2.py3-none-any.whl (5.2 MB)
Using cached ipython-8.29.0-py3-none-any.whl (819 kB)
Using cached jupyter_client-8.6.3-py3-none-any.whl (106 kB)
Using cached jupyter_core-5.7.2-py3-none-any.whl (28 kB)
Using cached matplotlib_inline-0.1.7-py3-none-any.whl (9.9 kB)
Using cached pyzmq-26.2.0-cp312-cp312-musllinux_1_1_x86_64.whl (1.4 MB)
Using cached tornado-6.4.1-cp38-abi3-musllinux_1_2_x86_64.whl (436 kB)
Using cached traitlets-5.14.3-py3-none-any.whl (85 kB)
Using cached nest_asyncio-1.6.0-py3-none-any.whl (5.2 kB)
Using cached packaging-24.2-py3-none-any.whl (65 kB)
Using cached jedi-0.19.1-py2.py3-none-any.whl (1.6 MB)
Using cached pexpect-4.9.0-py2.py3-none-any.whl (63 kB)
Using cached platformdirs-4.3.6-py3-none-any.whl (18 kB)
Using cached prompt_toolkit-3.0.48-py3-none-any.whl (386 kB)
Using cached pygments-2.18.0-py3-none-any.whl (1.2 MB)
Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Using cached stack_data-0.6.3-py3-none-any.whl (24 kB)
Using cached asttokens-2.4.1-py2.py3-none-any.whl (27 kB)
Using cached executing-2.1.0-py2.py3-none-any.whl (25 kB)
Using cached parso-0.8.4-py2.py3-none-any.whl (103 kB)
Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Using cached pure_eval-0.2.3-py3-none-any.whl (11 kB)
Using cached wcwidth-0.2.13-py2.py3-none-any.whl (34 kB)
Building wheels for collected packages: psutil
  Building wheel for psutil (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for psutil (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [41 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-312/psutil
      copying psutil/__init__.py -> build/lib.linux-x86_64-cpython-312/psutil
      copying psutil/_common.py -> build/lib.linux-x86_64-cpython-312/psutil
      copying psutil/_compat.py -> build/lib.linux-x86_64-cpython-312/psutil
      copying psutil/_psaix.py -> build/lib.linux-x86_64-cpython-312/psutil
      copying psutil/_psbsd.py -> build/lib.linux-x86_64-cpython-312/psutil
      copying psutil/_pslinux.py -> build/lib.linux-x86_64-cpython-312/psutil
      copying psutil/_psosx.py -> build/lib.linux-x86_64-cpython-312/psutil
      copying psutil/_psposix.py -> build/lib.linux-x86_64-cpython-312/psutil
      copying psutil/_pssunos.py -> build/lib.linux-x86_64-cpython-312/psutil
      copying psutil/_pswindows.py -> build/lib.linux-x86_64-cpython-312/psutil
      creating build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/__init__.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/__main__.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_memleaks.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_process.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_process_all.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_system.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_testutils.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-cpython-312/psutil/tests
      running build_ext
      building 'psutil._psutil_linux' extension
      creating build/temp.linux-x86_64-cpython-312/psutil
      creating build/temp.linux-x86_64-cpython-312/psutil/arch/linux
      gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -I/opt/shared_libraries/include/ncurses -I/opt/shared_libraries/include/ -I/opt/shared_libraries/include/ncurses -I/opt/shared_libraries/include/ -DTHREAD_STACK_SIZE=0x100000 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=610 -DPy_LIMITED_API=0x03060000 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -DPSUTIL_LINUX=1 -I/home/forted/00_PROJECTS/Jupyter_Kernel/Resources/opt/python/include/python3.12 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-cpython-312/psutil/_psutil_common.o
      psutil could not be installed from sources because gcc is not installed. Try running:
        sudo apt-get install gcc python3-dev
      error: command 'gcc' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for psutil
Failed to build psutil
ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects

Also I cant use PIP_TARGET environtment

25077667 commented 2 weeks ago

Thank you for reporting this issue!

You are correct. The psutil library has a few challenges in this area. It interacts with system-level APIs (such as those in libc) and exposes them through Python, which can introduce compatibility and compilation issues, especially in standalone environments.

To resolve this, you'll need to compile psutil yourself and replace the existing version in our standalone Python environment with your custom-built version. For guidance on building psutil, please refer to the psutil Developer Guide, which provides detailed instructions on how to compile it.

ForteDexe commented 2 weeks ago

Thank you, I will try it.