llama icon indicating copy to clipboard operation
llama copied to clipboard

example_text_completion.py doesn't work with Python 3.10

Open aleftos opened this issue 1 year ago • 3 comments

I try install llama package and I have the following error:

`pip install llama Defaulting to user installation because normal site-packages is not writeable Collecting llama Using cached llama-0.1.1.tar.gz (387 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-kf2rvx85/llama_8b2692e2cdd64abd8532f9c84b0d0629/setup.py", line 6, in execfile('llama/version.py') NameError: name 'execfile' is not defined [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details. ` I try to convert with 2to3 and I have the following error:

`pip install llama-0.1.1-1.tar.gz Processing ./llama-0.1.1-1.tar.gz Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [7 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-req-build-iiwz8a_w/setup.py", line 7, in exec(open('llama/init.py').read(), globals()) File "", line 1, in ImportError: attempted relative import with no known parent package [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. ` Suggestions please.

aleftos avatar Aug 10 '23 16:08 aleftos

I try "modernize" but I have the following error:

pip install llama-0.1.1-1.tar.gz Processing ./llama-0.1.1-1.tar.gz Preparing metadata (setup.py) ... done Collecting apscheduler>=3.2.0 Using cached APScheduler-3.10.1-py3-none-any.whl (59 kB) Collecting docopt>=0.6.2 Using cached docopt-0.6.2.tar.gz (25 kB) Preparing metadata (setup.py) ... done Collecting flask>=0.10.1 Using cached Flask-2.3.2-py3-none-any.whl (96 kB) Collecting futures>=3.0.3 Using cached futures-3.0.5.tar.gz (25 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [25 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 14, in File "/usr/lib/python3/dist-packages/setuptools/init.py", line 18, in from setuptools.dist import Distribution File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 31, in from setuptools.extern.more_itertools import unique_everseen File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 674, in _load_unlocked File "", line 571, in module_from_spec File "/usr/lib/python3/dist-packages/setuptools/extern/init.py", line 52, in create_module return self.load_module(spec.name) File "/usr/lib/python3/dist-packages/setuptools/extern/init.py", line 37, in load_module import(extant) File "/usr/lib/python3/dist-packages/setuptools/_vendor/more_itertools/init.py", line 1, in from .more import * # noqa File "/usr/lib/python3/dist-packages/setuptools/_vendor/more_itertools/more.py", line 5, in from concurrent.futures import ThreadPoolExecutor File "/tmp/pip-install-a6qs3o1h/futures_28f83c1eb3fb461f9e280160c5c49b45/concurrent/futures/init.py", line 8, in from concurrent.futures._base import (FIRST_COMPLETED, File "/tmp/pip-install-a6qs3o1h/futures_28f83c1eb3fb461f9e280160c5c49b45/concurrent/futures/_base.py", line 357 raise type(self._exception), self._exception, self._traceback ^ SyntaxError: invalid syntax [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

aleftos avatar Aug 10 '23 19:08 aleftos

the same to me.

lxq avatar Sep 05 '23 03:09 lxq

I have the same problem. Did you find the solution yet?

localhost101 avatar Nov 08 '23 03:11 localhost101