You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After successfully installing charm4py, and launching a python shell, import charm4py works in almost every context - except when the python shell is launched from the project root. I believe this is due to the c_object_store.*.so generation. Steps to reproduce the issue are below (this is within a python venv):
cd charm4py python setup.py install python >>> import charm4py
FAILS: ModuleNotFoundError: No module named 'charm4py.c_object_store' cd <any other directory> python >>> import charm4py
SUCCEEDS
Python import search process:
Python import searches the paths in sys.path for a <module_name>/__init.py__. The first entry in sys.path is always the current directory. Other relevant entries include .../lib/python3.11/site-packages, which is where the installed charm4py libraries live. In the charm4py case, the directory found by import must also include a c_object_store.*.so of some form to correctly import charm4py. The problem lies in the fact that $root/charm4py doesn't include this .so:
Potential solutions:
Copying the necessary .so from site-packages into $root/charm4py solves the issue. I'm not sure if the problem here is that the .so is not in this directory, or that import looks in the root directory to begin with.
The text was updated successfully, but these errors were encountered:
After successfully installing charm4py, and launching a python shell,
import charm4py
works in almost every context - except when the python shell is launched from the project root. I believe this is due to the c_object_store.*.so generation. Steps to reproduce the issue are below (this is within a python venv):Python import search process:
Python
import
searches the paths insys.path
for a<module_name>/__init.py__
. The first entry insys.path
is always the current directory. Other relevant entries include.../lib/python3.11/site-packages
, which is where the installed charm4py libraries live. In the charm4py case, the directory found by import must also include ac_object_store.*.so
of some form to correctly import charm4py. The problem lies in the fact that$root/charm4py
doesn't include this .so:Potential solutions:
Copying the necessary .so from site-packages into
$root/charm4py
solves the issue. I'm not sure if the problem here is that the .so is not in this directory, or that import looks in the root directory to begin with.The text was updated successfully, but these errors were encountered: