scikit-build / scikit-build-sample-projects

Sample projects demonstrating use of scikit-build
74 stars 27 forks source link

pip install --editable . not working #41

Open Zhaoyilunnn opened 1 year ago

Zhaoyilunnn commented 1 year ago

https://github.com/scikit-build/scikit-build-sample-projects/tree/master/projects/hello-pybind11

I tried to start from this sample project.

pip install . works fine,

However, pip install -e . failed.

ModuleNotFoundError: No module named 'hello._hello'

Here's the info about my system and evironment.

System

NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Python env

Package            Version  Editable project location
------------------ -------- -------------------------------------------------------------------
build              0.10.0
certifi            2023.5.7
charset-normalizer 3.2.0
cmake              3.27.0
contourpy          1.1.0
cycler             0.11.0
distro             1.8.0
exceptiongroup     1.1.2
fonttools          4.41.0
hello-pybind11     1.2.3    /root/projects/scikit-build-sample-projects/projects/hello-pybind11
idna               3.4
iniconfig          2.0.0
kiwisolver         1.4.4
llvmlite           0.40.1
matplotlib         3.7.2
networkx           3.1
numba              0.57.1
numpy              1.24.4
packaging          23.1
Pillow             10.0.0
pip                23.1.2
pluggy             1.2.0
pybind11           2.11.1
pyparsing          3.0.9
pyproject_hooks    1.0.0
PySocks            1.7.1
pytest             7.4.0
python-dateutil    2.8.2
requests           2.31.0
scikit-build       0.17.6
scipy              1.11.1
setuptools         67.8.0
six                1.16.0
sparse             0.14.0
tomli              2.0.1
urllib3            2.0.4
wheel              0.38.4

By the way, python setup.py develop works also fine, seems that pip install -e . does not trigger the compilation of C++ sources. So this seems not to be a problem with scikit-build. Does anybody know a workaround to make pip install -e . work?