Dear Folks,
I am using the newly announced PYTHON_VERSION feature to choose the Python version I need and use Pipenv.
Using the latest version of Python 3.13 works without issues but using Python 3.12 or 3.11 fails the build as the package installation does not complete successfully.
I have pasted the traceback I recieve on Netlify below using Python 3.11:
6:12:34 PM: mise python@3.11.10 installing
6:12:34 PM: mise python@3.11.10 downloading cpython-3.11.10+20241016-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
6:12:34 PM: mise python@3.11.10 installing cpython-3.11.10+20241016-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz
6:12:38 PM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
6:12:34 PM: mise python@3.11.10 python --version
6:12:34 PM: mise python@3.11.10 Python 3.11.10
6:12:34 PM: mise python@3.11.10 ✓ installed
6:12:34 PM: Python version set to 3.11
6:12:34 PM: Found Pipfile restoring Pipenv virtualenv
6:12:34 PM: Started restoring cached python virtualenv
6:12:34 PM: Finished restoring cached python virtualenv
6:12:36 PM: Collecting pipenv
6:12:36 PM: Downloading pipenv-2024.4.0-py3-none-any.whl.metadata (19 kB)
6:12:36 PM: Collecting certifi (from pipenv)
6:12:36 PM: Downloading certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB)
6:12:36 PM: Collecting packaging>=22 (from pipenv)
6:12:36 PM: Downloading packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
6:12:36 PM: Requirement already satisfied: setuptools>=67 in /opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages (from pipenv) (70.3.0)
6:12:36 PM: Collecting virtualenv>=20.24.2 (from pipenv)
6:12:36 PM: Downloading virtualenv-20.28.0-py3-none-any.whl.metadata (4.4 kB)
6:12:36 PM: Collecting distlib<1,>=0.3.7 (from virtualenv>=20.24.2->pipenv)
6:12:36 PM: Downloading distlib-0.3.9-py2.py3-none-any.whl.metadata (5.2 kB)
6:12:36 PM: Collecting filelock<4,>=3.12.2 (from virtualenv>=20.24.2->pipenv)
6:12:36 PM: Downloading filelock-3.16.1-py3-none-any.whl.metadata (2.9 kB)
6:12:36 PM: Collecting platformdirs<5,>=3.9.1 (from virtualenv>=20.24.2->pipenv)
6:12:36 PM: Downloading platformdirs-4.3.6-py3-none-any.whl.metadata (11 kB)
6:12:36 PM: Downloading pipenv-2024.4.0-py3-none-any.whl (3.0 MB)
6:12:36 PM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 40.5 MB/s eta 0:00:00
6:12:36 PM: Downloading packaging-24.2-py3-none-any.whl (65 kB)
6:12:36 PM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.5/65.5 kB 10.1 MB/s eta 0:00:00
6:12:36 PM: Downloading virtualenv-20.28.0-py3-none-any.whl (4.3 MB)
6:12:36 PM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 187.2 MB/s eta 0:00:00
6:12:36 PM: Downloading certifi-2024.8.30-py3-none-any.whl (167 kB)
6:12:36 PM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 167.3/167.3 kB 16.9 MB/s eta 0:00:00
6:12:36 PM: Downloading distlib-0.3.9-py2.py3-none-any.whl (468 kB)
6:12:36 PM: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 469.0/469.0 kB 41.7 MB/s eta 0:00:00
6:12:36 PM: Downloading filelock-3.16.1-py3-none-any.whl (16 kB)
6:12:36 PM: Downloading platformdirs-4.3.6-py3-none-any.whl (18 kB)
6:12:36 PM: Installing collected packages: distlib, platformdirs, packaging, filelock, certifi, virtualenv, pipenv
6:12:38 PM: Successfully installed certifi-2024.8.30 distlib-0.3.9 filelock-3.16.1 packaging-24.2 pipenv-2024.4.0 platformdirs-4.3.6 virtualenv-20.28.0
6:12:38 PM: [notice] A new release of pip is available: 24.1.2 -> 24.3.1
6:12:38 PM: [notice] To update, run: pip install --upgrade pip
6:12:38 PM: Installing dependencies from Pipfile
6:12:38 PM: To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
6:12:38 PM: Installing dependencies from Pipfile.lock (764e9d)...
6:12:38 PM: Traceback (most recent call last):
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/bin/pipenv", line 8, in <module>
6:12:38 PM: sys.exit(cli())
6:12:38 PM: ^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1157, in __call__
6:12:38 PM: return self.main(*args, **kwargs)
6:12:38 PM: ^^^^^^^^^^^^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/cli/options.py", line 52, in main
6:12:38 PM: return super().main(*args, **kwargs, windows_expand_args=False)
6:12:38 PM: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1078, in main
6:12:38 PM: rv = self.invoke(ctx)
6:12:38 PM: ^^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1688, in invoke
6:12:38 PM: return _process_result(sub_ctx.command.invoke(sub_ctx))
6:12:38 PM: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1434, in invoke
6:12:38 PM: return ctx.invoke(self.callback, **ctx.params)
6:12:38 PM: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
6:12:38 PM: return __callback(*args, **kwargs)
6:12:38 PM: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/vendor/click/decorators.py", line 92, in new_func
6:12:38 PM: return ctx.invoke(f, obj, *args, **kwargs)
6:12:38 PM: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
6:12:38 PM: return __callback(*args, **kwargs)
6:12:38 PM: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/cli/command.py", line 207, in install
6:12:38 PM: do_install(
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/routines/install.py", line 341, in do_install
6:12:38 PM: raise e
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/routines/install.py", line 327, in do_install
6:12:38 PM: do_install_dependencies(
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/routines/install.py", line 530, in do_install_dependencies
6:12:38 PM: batch_install(
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/routines/install.py", line 595, in batch_install
6:12:38 PM: deps_to_install = [
6:12:38 PM: ^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/routines/install.py", line 598, in <listcomp>
6:12:38 PM: if not project.environment.is_satisfied(dep)
6:12:38 PM: ^^^^^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/project.py", line 508, in environment
6:12:38 PM: self._environment = self.get_environment(allow_global=allow_global)
6:12:38 PM: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/project.py", line 494, in get_environment
6:12:38 PM: environment = Environment(
6:12:38 PM: ^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/environment.py", line 81, in __init__
6:12:38 PM: self._base_paths = self.get_paths()
6:12:38 PM: ^^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/environment.py", line 342, in get_paths
6:12:38 PM: c = subprocess_run(command)
6:12:38 PM: ^^^^^^^^^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/site-packages/pipenv/utils/processes.py", line 72, in subprocess_run
6:12:38 PM: return subprocess.run(
6:12:38 PM: ^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/subprocess.py", line 548, in run
6:12:38 PM: with Popen(*popenargs, **kwargs) as process:
6:12:38 PM: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/subprocess.py", line 1026, in __init__
6:12:38 PM: self._execute_child(args, executable, preexec_fn, close_fds,
6:12:38 PM: File "/opt/buildhome/.local/share/mise/installs/python/3.11.10/lib/python3.11/subprocess.py", line 1955, in _execute_child
6:12:38 PM: raise child_exception_type(errno_num, err_msg, err_filename)
6:12:38 PM: FileNotFoundError: [Errno 2] No such file or directory: '/opt/build/repo/.venv/bin/python'
6:12:38 PM: Error installing Pipenv dependencies
6:12:38 PM: Failing build: Failed to install dependencies
It am not sure what the problem is but it looks like there maybe some package which is failing to install. Perhaps something to do with Pipenv.
I hope someone can lend me a hand.
Many thanks,