Skip to content
New issue

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

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

Already on GitHub? # to your account

Cannot find installed Python packages #70

Open
elimydlarz opened this issue Oct 12, 2024 · 3 comments
Open

Cannot find installed Python packages #70

elimydlarz opened this issue Oct 12, 2024 · 3 comments
Labels
bug Something isn't working needs investigation Needs to be investigated further

Comments

@elimydlarz
Copy link

elimydlarz commented Oct 12, 2024

I'm new to Python, so I hope my environment is setup correctly - I followed instructions carefully.

I'm using Poetry - here is pyproject.toml in my Deno project root:

[tool.poetry]
name = "engine"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.13"
graphiti-core = "^0.3.9"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

I've added the dependency. If I do it again like so, it seems to confirm that:

❯ poetry add graphiti-core@latest
Using version ^0.3.9 for graphiti-core

Updating dependencies
Resolving dependencies... (0.1s)

No dependencies to install or update

I'm also exporting DENO_PYTHON_PATH as per instructions:

export DENO_PYTHON_PATH="/opt/homebrew/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/libpython3.13.dylib"

But when I run my Deno entry point, I get this error:

❯ deno task ws                                                                
Task ws deno run --allow-read --allow-write --allow-env --allow-net --allow-ffi --unstable src/ws.ts
error: Uncaught (in promise) PythonError: No module named 'graphiti_core'

What am I doing wrong?

@elimydlarz
Copy link
Author

In case anybody else is also struggling, I worked around this by giving up on the Pip approach in the docs (in code) and was able to make it work using just python#import.

Also kept everything really simple by uninstalling my Python installation from brew and using the official installer only - maybe that would be problematic for somebody working on other Python projects, but not for me.

@rohanrehman
Copy link

@elimydlarz could you confirm wich ver of python you got it wokring with?

@eliassjogreen eliassjogreen added the bug Something isn't working label Feb 10, 2025
@eliassjogreen
Copy link
Member

Probably related to #78, #79 and has to do with python import resolution. May also be because of mismatching environment to the global one when using virtual environments. This is something that needs further investigation.

@eliassjogreen eliassjogreen added the needs investigation Needs to be investigated further label Feb 10, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working needs investigation Needs to be investigated further
Projects
None yet
Development

No branches or pull requests

3 participants