Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicitly setting python version to 3.12 #445

Closed

Conversation

cadenmackenzie
Copy link
Contributor

As stated in the README you must use Python>=3.12.0 however I was not able to create a venv and install the packages with version Python 3.13.0. I had to explicitly set the version to 3.12 to create a successful venv.

Is this a valid solution for now or is it worth trying to fix the issues with 3.13?

I am using a Mac M1. I can create the issue I was experiencing with 3.13 if needed.

@cadenmackenzie
Copy link
Contributor Author

Added issue with some logs: #446

@dtnewman
Copy link
Contributor

dtnewman commented Nov 13, 2024

+1 on this. This will help alleviate a lot of confusion since at this point the repo only really works in 3.12. I have a recommend change though. How about adding:

if command -v python3.12 &>/dev/null; then
    echo "Python 3.12 is installed, proceeding..."
else
    echo "This repo currently only works with Python 3.12, which is not installed on your machine. Please install Python 3.12 and try again."
    exit 1
fi

@cadenmackenzie
Copy link
Contributor Author

@dtnewman great suggestion. Added to install.sh

@cadenmackenzie
Copy link
Contributor Author

@AlexCheema this came up in the help channel yesterday.

Screenshot 2024-11-21 at 7 41 49 AM

worth merging in?

@AlexCheema
Copy link
Contributor

AlexCheema commented Nov 23, 2024

Should not be necessary after 2dafa9c
This makes EXO compatible with Python 3.9,3.10,3.11,3.12,3.13. Still leaving the requirement for Python >= 3.12 in the README for now.

Closing for now. Can you test that it works now with earlier version of Python? @cadenmackenzie
If not, please re-open.

@AlexCheema AlexCheema closed this Nov 23, 2024
@cadenmackenzie
Copy link
Contributor Author

cadenmackenzie commented Nov 24, 2024

@AlexCheema I am still getting an error when I use my default python version (3.13) and try to run source install.sh

Building wheel for sentencepiece (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for sentencepiece (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [109 lines of output]
/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-sk4mu2lk/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
...

File "", line 87, in build_extension
File "/opt/homebrew/Cellar/[email protected]/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 419, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['./build_bundled.sh', '0.2.0']' returned non-zero exit status 127.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for sentencepiece
Successfully built exo nuitka tinygrad
Failed to build sentencepiece

[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (sentencepiece)
(.venv) cadenmackenzie@Caden-Macbook-Pro-14 exo % exo
zsh: command not found: exo
(.venv) cadenmackenzie@Caden-Macbook-Pro-14 exo % python --version
Python 3.13.0

Different error than I was getting before but still not working

@AlexCheema
Copy link
Contributor

AlexCheema commented Nov 25, 2024

Did you try upgrading pip as instructed in the message?

@cadenmackenzie
Copy link
Contributor Author

@AlexCheema yes, still getting the error:

cadenmackenzie@Caden-Macbook-Pro-14 exo % python3 --version
Python 3.13.0
cadenmackenzie@Caden-Macbook-Pro-14 exo % source install.sh
...
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
Collecting tinygrad@ git+https://github.com/tinygrad/tinygrad.git@3b26e51fcebfc6576f4e0f99693e6f1406d61d79 (from exo==0.0.1)
Using cached tinygrad-0.10.0-py3-none-any.whl
Collecting aiohttp==3.10.11 (from exo==0.0.1)
...
Building wheels for collected packages: exo, sentencepiece
Building editable for exo (pyproject.toml) ... done
Created wheel for exo: filename=exo-0.0.1-0.editable-py3-none-any.whl size=15497 sha256=aa9cc092ccc4ce700dc8c3685981a08f0dd35b8acd19636ae22fedff4ddc5e66
Stored in directory: /private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-ephem-wheel-cache-q37fm_yr/wheels/2d/d5/ca/28701ccb455f52034a0510efc039d1f34787ce599fa8263435
Building wheel for sentencepiece (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for sentencepiece (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [109 lines of output]
/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-bie1ocyq/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build/lib.macosx-15.0-arm64-cpython-313/sentencepiece
copying src/sentencepiece/init.py -> build/lib.macosx-15.0-arm64-cpython-313/sentencepiece
copying src/sentencepiece/_version.py -> build/lib.macosx-15.0-arm64-cpython-313/sentencepiece
copying src/sentencepiece/sentencepiece_model_pb2.py -> build/lib.macosx-15.0-arm64-cpython-313/sentencepiece
copying src/sentencepiece/sentencepiece_pb2.py -> build/lib.macosx-15.0-arm64-cpython-313/sentencepiece
running build_ext
Package sentencepiece was not found in the pkg-config search path.
Perhaps you should add the directory containing `sentencepiece.pc'
to the PKG_CONFIG_PATH environment variable
Package 'sentencepiece' not found
./build_bundled.sh: line 21: cmake: command not found
./build_bundled.sh: line 22: nproc: command not found
./build_bundled.sh: line 22: cmake: command not found
Traceback (most recent call last):
...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
metadata_directory)
^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-bie1ocyq/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 438, in build_wheel
return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-bie1ocyq/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 426, in _build
return self._build_with_temp_dir(
~~~~~~~~~~~~~~~~~~~~~~~~~^
cmd,
^^^^
...<3 lines>...
self._arbitrary_args(config_settings),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
...
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-bie1ocyq/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
self._build_extensions_serial()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-bie1ocyq/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
self.build_extension(ext)
~~~~~~~~~~~~~~~~~~~~^^^^^
File "", line 87, in build_extension
File "/opt/homebrew/Cellar/[email protected]/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 419, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['./build_bundled.sh', '0.2.0']' returned non-zero exit status 127.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for sentencepiece
Successfully built exo
Failed to build sentencepiece

[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (sentencepiece)
(.venv) cadenmackenzie@Caden-Macbook-Pro-14 exo % pip install --upgrade pip
Requirement already satisfied: pip in ./.venv/lib/python3.13/site-packages (24.2)
Collecting pip
Using cached pip-24.3.1-py3-none-any.whl.metadata (3.7 kB)
Using cached pip-24.3.1-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 24.2
Uninstalling pip-24.2:
Successfully uninstalled pip-24.2
Successfully installed pip-24.3.1
(.venv) cadenmackenzie@Caden-Macbook-Pro-14 exo % pip install -e .
...
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
Collecting tinygrad@ git+https://github.com/tinygrad/tinygrad.git@3b26e51fcebfc6576f4e0f99693e6f1406d61d79 (from exo==0.0.1)
Using cached tinygrad-0.10.0-py3-none-any.whl
Collecting aiohttp==3.10.11 (from exo==0.0.1)
Using cached aiohttp-3.10.11-cp313-cp313-macosx_11_0_arm64.whl.metadata (7.7 kB)
...
Using cached propcache-0.2.0-cp313-cp313-macosx_11_0_arm64.whl (44 kB)
Building wheels for collected packages: exo, sentencepiece
Building editable for exo (pyproject.toml) ... done
Created wheel for exo: filename=exo-0.0.1-0.editable-py3-none-any.whl size=15497 sha256=69bcf46695741868f9e1ac6fdcaa59e44af745d3f0775620bf98f2f0da3c697d
Stored in directory: /private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-ephem-wheel-cache-e9z4cjw8/wheels/2d/d5/ca/28701ccb455f52034a0510efc039d1f34787ce599fa8263435
Building wheel for sentencepiece (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for sentencepiece (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [109 lines of output]
/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build/lib.macosx-15.0-arm64-cpython-313/sentencepiece
copying src/sentencepiece/init.py -> build/lib.macosx-15.0-arm64-cpython-313/sentencepiece
copying src/sentencepiece/_version.py -> build/lib.macosx-15.0-arm64-cpython-313/sentencepiece
copying src/sentencepiece/sentencepiece_model_pb2.py -> build/lib.macosx-15.0-arm64-cpython-313/sentencepiece
copying src/sentencepiece/sentencepiece_pb2.py -> build/lib.macosx-15.0-arm64-cpython-313/sentencepiece
running build_ext
Package sentencepiece was not found in the pkg-config search path.
Perhaps you should add the directory containing `sentencepiece.pc'
to the PKG_CONFIG_PATH environment variable
Package 'sentencepiece' not found
./build_bundled.sh: line 21: cmake: command not found
./build_bundled.sh: line 22: nproc: command not found
./build_bundled.sh: line 22: cmake: command not found
Traceback (most recent call last):
...
^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 438, in build_wheel
return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 426, in _build
return self._build_with_temp_dir(
~~~~~~~~~~~~~~~~~~~~~~~~~^
cmd,
^^^^
...<3 lines>...
self._arbitrary_args(config_settings),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 407, in _build_with_temp_dir
self.run_setup()
~~~~~~~~~~~~~~^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "", line 169, in
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/init.py", line 117, in setup
return distutils.core.setup(**attrs)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 183, in setup
return run_commands(dist)
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
dist.run_commands()
~~~~~~~~~~~~~~~~~^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
self.run_command(cmd)
~~~~~~~~~~~~~~~~^^^^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 995, in run_command
super().run_command(command)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
~~~~~~~~~~~^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/command/bdist_wheel.py", line 381, in run
self.run_command("build")
~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 995, in run_command
super().run_command(command)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
~~~~~~~~~~~^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/dist.py", line 995, in run_command
super().run_command(command)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
~~~~~~~~~~~^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/command/build_ext.py", line 99, in run
_build_ext.run(self)
~~~~~~~~~~~~~~^^^^^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
~~~~~~~~~~~~~~~~~~~~~^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
self._build_extensions_serial()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/private/var/folders/zk/z31x678d3wnbf6tpgv_cw5940000gp/T/pip-build-env-56p25cw2/overlay/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
self.build_extension(ext)
~~~~~~~~~~~~~~~~~~~~^^^^^
File "", line 87, in build_extension
File "/opt/homebrew/Cellar/[email protected]/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 419, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['./build_bundled.sh', '0.2.0']' returned non-zero exit status 127.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for sentencepiece
Successfully built exo
Failed to build sentencepiece
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (sentencepiece)
(.venv) cadenmackenzie@Caden-Macbook-Pro-14 exo %

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants