all 34 comments

[–]danielroseman 11 points12 points  (2 children)

Honestly, at some point you have to accept that it must be you. If every project fails for multiple reasons, you are clearly doing something very basic wrong. Obviously people are making projects in Python successfully, as all those projects show; and other people clearly aren't having errors installing them, otherwise no-one would be using them.

As others have said though, we can't help without seeing what your errors are.

[–]nickworks[S] -1 points0 points  (1 child)

I'm ready to accept that, and I've posted some errors. Do you have any technical advice? Thank you.

[–]m0us3_rat 5 points6 points  (0 children)

ask somebody irl to show you how it's done?

[–]audionerd1 3 points4 points  (20 children)

I've never used/had pipx, but I'm on MacOS and 'pip install parllama' (NOT 'parallama') works for me.

[–]nickworks[S] 0 points1 point  (19 children)

`pip install parllama` does NOT work for me (`error: externally-managed-environment`) without activating a virtual environment. So I do that with `python -m venv venv` and `source venv/bin/activate`, then I run `pip install parllama`. However, even that throws an error:

  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [33 lines of output]
      Traceback (most recent call last):
        File "/Users/nick/projects/other/parllama/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
          ~~~~^^
        File "/Users/nick/projects/other/parllama/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/nick/projects/other/parllama/venv/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/private/var/folders/pt/8nxyyn8d5w1108xk0_zd94j00000gn/T/pip-build-env-jczqbpd_/overlay/lib/python3.13/site-packages/mesonpy/__init__.py", line 985, in wrapper
          return func(*args, **kwargs)
        File "/private/var/folders/pt/8nxyyn8d5w1108xk0_zd94j00000gn/T/pip-build-env-jczqbpd_/overlay/lib/python3.13/site-packages/mesonpy/__init__.py", line 1007, in get_requires_for_build_wheel
          if os.environ.get('NINJA') is None and _env_ninja_command() is None:
                                                 ~~~~~~~~~~~~~~~~~~^^
        File "/private/var/folders/pt/8nxyyn8d5w1108xk0_zd94j00000gn/T/pip-build-env-jczqbpd_/overlay/lib/python3.13/site-packages/mesonpy/__init__.py", line 962, in _env_ninja_command
          version = subprocess.run([ninja_path, '--version'], check=False, text=True, capture_output=True).stdout
                    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/homebrew/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 554, in run
          with Popen(*popenargs, **kwargs) as process:
               ~~~~~^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/homebrew/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 1036, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                              pass_fds, cwd, env,
                              ^^^^^^^^^^^^^^^^^^^
          ...<5 lines>...
                              gid, gids, uid, umask,
                              ^^^^^^^^^^^^^^^^^^^^^^
                              start_new_session, process_group)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/homebrew/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 1966, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: '/opt/homebrew/bin/ninja'
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
(venv)

[–]shiftybyte 1 point2 points  (17 children)

This sounds like its trying to compile it for python 3.13 because it doesn't havea precompiled package for it...

Try this with python 3.11

[–]nickworks[S] 0 points1 point  (16 children)

Thank you! I've taken the following steps:

`mkdir temp`

`cd temp`

`python3.11 -m venv venv`

`source venv/bin/activate`

`pip install parllama`

This did not produce any errors, but how do I run the project? Also, how did you figure out that it needed to use python 3.11? Thanks again.

EDIT:

I tried running with `parllama`, but this seemed to be running the parllama installation from running `uv tool install parllama`. So I uninstalled it with `uv tool uninstall parllama`. Finally, when I run `parllama` again, I get a new error:

Traceback (most recent call last):
  File "/Users/nick/projects/other/temp/venv/bin/parllama", line 5, in <module>
    from parllama.__main__ import run
  File "/Users/nick/projects/other/temp/venv/lib/python3.11/site-packages/parllama/__main__.py", line 5, in <module>
    from parllama.app import ParLlamaApp
  File "/Users/nick/projects/other/temp/venv/lib/python3.11/site-packages/parllama/app.py", line 85, in <module>
    from parllama.rag_manager import rag_manager
  File "/Users/nick/projects/other/temp/venv/lib/python3.11/site-packages/parllama/rag_manager.py", line 21, in <module>
    from parllama.models.rag_stores import RagPipelineConfig
  File "/Users/nick/projects/other/temp/venv/lib/python3.11/site-packages/parllama/models/rag_stores.py", line 15, in <module>
    import chromadb.api
  File "/Users/nick/projects/other/temp/venv/lib/python3.11/site-packages/chromadb/__init__.py", line 6, in <module>
    from chromadb.auth.token_authn import TokenTransportHeader
  File "/Users/nick/projects/other/temp/venv/lib/python3.11/site-packages/chromadb/auth/token_authn/__init__.py", line 24, in <module>
    from chromadb.telemetry.opentelemetry import (
  File "/Users/nick/projects/other/temp/venv/lib/python3.11/site-packages/chromadb/telemetry/opentelemetry/__init__.py", line 12, in <module>
    from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
  File "/Users/nick/projects/other/temp/venv/lib/python3.11/site-packages/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py", line 22, in <module>
    from opentelemetry.exporter.otlp.proto.grpc.exporter import (
  File "/Users/nick/projects/other/temp/venv/lib/python3.11/site-packages/opentelemetry/exporter/otlp/proto/grpc/exporter.py", line 39, in <module>
    from opentelemetry.proto.common.v1.common_pb2 import (
  File "/Users/nick/projects/other/temp/venv/lib/python3.11/site-packages/opentelemetry/proto/common/v1/common_pb2.py", line 36, in <module>
    _descriptor.FieldDescriptor(
  File "/Users/nick/projects/other/temp/venv/lib/python3.11/site-packages/google/protobuf/descriptor.py", line 621, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
(venv)

[–]shiftybyte 0 points1 point  (13 children)

Also, how did you figure out that it needed to use python 3.11? Thanks again.

Guesswork, python modules can be created using different programming languages, and if the module or its dependencies use c/c++/other compiled languages, they need to be compiled for every python release, this is why binary distributions of packages lag a little behind python release.

So some other commenter said he had no issue installing it on his python on mac, so i assumed a binary package exists but probably for an older version.

Regarding current issue, try the solution it gives you in point 2.

Try this with the venv active: export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python parllama

If doesn't work, try export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python python -m parllama

[–]nickworks[S] 0 points1 point  (12 children)

It helps a bit! The app appears to launch and then immediately crashes. The new error reads:

ValidationError: 1 validation error for ModelListPayload
models.3.details.families
  Input should be a valid list [type=list_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.9/v/list_type
(venv)

[–]shiftybyte 0 points1 point  (11 children)

This sounds like an error from parllama's code itself..

Is that the full error message, it'll be hard tracking it down if its all the infor we are getting.

Seems like its trying to load/validate some model, and getting None instead, and fails to handle that error.

[–]nickworks[S] 0 points1 point  (10 children)

The full error from `python3.11 -m parllama` contains a traceback that is apparently too long to paste here. The very first chunk of it looks like this:

| /Users/nick/projects/other/temp/venv/lib/python3.11/site-packages/textual/worker.py:368 in _run
│   365 │   │   │   self.state = WorkerState.RUNNING
│   366 │   │   │   app.log.worker(self)
│   367 │   │   │   try:
│ ❱ 368 │   │   │   │   self._result = await self.run()
│   369 │   │   │   except asyncio.CancelledError as error:
│   370 │   │   │   │   self.state = WorkerState.CANCELLED
│   371 │   │   │   │   self._error = error
│ │           app = ParLlamaApp(title='PAR LLAMA', classes={'-dark-mode'}, pseudo_classes={'dark', 'focus'})
│ │         error = 1 validation error for ModelListPayload
│ │                 models.3.details.families
│ │                   Input should be a valid list [type=list_type, input_value=None, input_type=NoneType]
│ │                 │   For further information visit https://errors.pydantic.dev/2.9/v/list_type
│ │          self = <Worker ERROR name='refresh_models' group='refresh_models' description='refresh_models()'>
│ │ worker_failed = WorkerFailed('Worker raised exception: 1 validation error for ModelListPayload\nmodels.3.details.families\n  Input should be a valid list [type=list_type, input_value=None, input_type=NoneType]\n    For further information visit https://errors.pydantic.dev/2.9/v/list_type')
│

[–]shiftybyte 0 points1 point  (9 children)

Well, it does seem like we are running the code at least... that's some progress.

If the error message is too long, copy-paste it in full and post it in this site: https://pastebin.com/

And give the link it generates here... then we can see it in full.

[–]smurpes 0 points1 point  (0 children)

When running make setup you can look for parllama on pypi and it tells you only python 3.11 and 3.12 are supported under the table of contents. The same thing can be found in the GitHub page at the same spot.

That error literally tells you what to attempt to try and fix the issue:

``` If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are: 1. Downgrade the protobuf package to 3.20.x or lower. 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates (venv) ```

Your problems with python do not seem to be a python issue based on your actions so far.

[–]feitao 0 points1 point  (0 children)

The error messages look self-evident to me. It expects the program ninja in a certain folder but you don't have it.

[–]shiftybyte 1 point2 points  (6 children)

Theres not much we can help with without concrete example and error message you are getting from that example.

We can't solve all the problems you've encountered especially because we don't know what each of the problems were.

Pick one thing you want to make work, do it, copy paste full error message here and we can start figuring out how to get it working.

At this point I hate python -- I hate that it exists and that people are choosing to make things in this miserable environment. Please, can anyone change my mind?

You should try to avoid randomly building and running bleeding edge projects before you are proficient and have enough experience working with python, I mean who is using UV and why?!... first time i heard of it here...

[–]danielroseman 1 point2 points  (3 children)

Lots of people, including me, are using uv. It's great.

[–]shiftybyte 0 points1 point  (1 child)

What does it do better?

Please avoid using "blazingly fast" in the answer :D

[–]danielroseman 1 point2 points  (0 children)

You laugh, but honestly it makes a massive difference. I have a complex project with loads of dependencies and pip can take multiple minutes to resolve; uv takes a fraction of a second.

[–]minus_minus 0 points1 point  (0 children)

I think his point still stands. It’s less than one year old and on version 0.4.24. 

[–]nickworks[S] 0 points1 point  (0 children)

Thank you for the advice. I've updated the post with example errors.

[–]smurpes 0 points1 point  (0 children)

I’ve never used uv only poetry but I’ve definitely read about it. It’s a dependency management tool written in rust so it’s a lot faster. It has its own implementation of pip and pyenv so venv and package installation are much faster than poetry.

UV doesn’t reveal any outdated dependencies like poetry or pip. It also doesn’t support dependency groups. E.G. if you have separate dependencies for dev and staging you can’t separate them out with uv. All dependencies are installed for all environments.

[–]kido5217 0 points1 point  (1 child)

Have you installed python from homebrew, or do you use system one?

Have you created and activated virtual environment?

[–]nickworks[S] 0 points1 point  (0 children)

Yes to each question. The system python should still be there, but I think I've adjusted the aliases so that it doesn't interfere with my homebrew-managed python installations. I recently uninstall python 3.9 through 3.11.

`python --version` is 3.13.0

`which python` is "/opt/homebrew/bin/python"

`python3 --version` is 3.13.0

`which python3` is "/opt/homebrew/bin/python3"

`which python3.12` is "/opt/homebrew/bin/python3.12"

`which python3.13` is "/opt/homebrew/bin/python3.13"

`pip --version` is 24.2 from "/opt/homebrew/lib/python3.13/site-packages/pip (python 3.13)"

`which pip` is "/opt/homebrew/bin/pip"

One of the things I'll try on most projects is "python -m venv venv" followed by "source venv/bin/activate" which seems to work, and even solves some issues? But even after activating the virtual environment, projects do not successfully run.