Skip to content

Python packages not found if installed with venv #78

@al6x

Description

@al6x

On mac os it works well with packages installed with brew but when using venv and packages installed with pip - it can't find it.

The sys.path is different when run with python and bunpy, the bunpy misses the venv installation dir

python

[
  '/Users/alex/base/projects/ext_ts/math',
  '/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python312.zip',
  '/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12',
  '/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/lib-dynload',
  '/Applications/misc/python/lib/python3.12/site-packages' 
]

bunpy (misses '/Applications/misc/python/lib/python3.12/site-packages' )

[
  '/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python312.zip',
  '/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12',
  '/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/lib-dynload',
  '/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages'
]

P.S.

I also had to explicitly set python lib, by default it can't find it

export DENO_PYTHON_PATH=/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/libpython3.12.dylib

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions