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
I have a python version with path name "python" and a different version with "py"
used the command python -m pip install, with python -m pip list to ensure the package existed in the correct version
Using the pip uninstall command the output:
*\python314\lib\site-packages\hello-0.0.1.dist-info*
*\python314\lib\site-packages\hello_core.cp314-win_amd64.pyd
gave me a clue that the attributes were being stored in a second location. Issue Single module package? #63 contained the final clue to the naming convention to get access to the attributes
The automatically generated signatures of the class functions contain then something like packagename.modulename.classname
Therefore in order to get access to the defined attributes and follow the tutorial the import statement must be
Following the instructions I am able to build and import the python module. However the module is missing all attributes (add, docs, subtract),
import scikit_build_examplescikit_build_example.add(1,2)Theorized that it may have to do with how pybind11 is linked
pip install ./scikit_build_examplepip uninstalled scikit_build_example-0.0.1
pip installed scikit_build_example-0.01
6.
import scikit_build_examplescikit_build_example.add(1,2)For both cases the python dir(module) command output line
dir(scikit_build_example)['doc', 'file', 'loader', 'name', 'package', 'path', 'spec']
Nox log has been attached
nox_log.txt
Help would be appreciated in resolving this issue
*Edit: Solution
used the command python -m pip install, with python -m pip list to ensure the package existed in the correct version
*\python314\lib\site-packages\hello-0.0.1.dist-info*
*\python314\lib\site-packages\hello_core.cp314-win_amd64.pyd
gave me a clue that the attributes were being stored in a second location. Issue Single module package? #63 contained the final clue to the naming convention to get access to the attributes
Therefore in order to get access to the defined attributes and follow the tutorial the import statement must be
'dir(scikit_build_example._core)'
['doc', 'file', 'loader', 'name', 'package', 'spec', 'version', 'add', 'subtract']