-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Noo module named slycot #63
Comments
Probably isn't doing what you think it should. You should |
I take that back. It actually seems like cmake is packaged for installation via pypi: https://pypi.org/project/cmake/ |
I also tried to install slycot from source which leads to the same issue. |
Are you sure you have installed the package into a directory that is on your path? Are you trying to import from the same Python executable that the package was installed alongside? |
I fixed that, because I had the same issue : #62 |
Ah-ha; the files have been installed in "slycot" off the virtual-env root, rather than in site-packages; I remember this happening on Windows when I was trying to build wheels there, but I thought it was a peculiarity of that environment. The result below is from an Ubuntu 18.04 system. If anyone knows why this would happen, please speak up. Do we need to teach scikit-build or CMake about the "normal" install directories, maybe?
|
With the diff below, I can build a wheel (
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63b32e0..67973f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,8 @@ endif()
project(slycot VERSION ${SLYCOT_VERSION} LANGUAGES NONE)
+find_package(PythonExtensions REQUIRED)
+
# Fortran detection fails on windows, use the CMAKE_C_SIMULATE flag to
# force success
if(WIN32)
diff --git a/slycot/CMakeLists.txt b/slycot/CMakeLists.txt
index 3207d92..7d8c377 100644
--- a/slycot/CMakeLists.txt
+++ b/slycot/CMakeLists.txt
@@ -3,7 +3,6 @@
#
# RvP, 180710
-
set(FSOURCES
src/AB01MD.f src/MA02AD.f src/MB03YT.f src/NF01BW.f src/SB10KD.f
@@ -166,7 +165,7 @@ target_include_directories(
${PYTHON_INCLUDE_DIRS}
)
-install(TARGETS ${SLYCOT_MODULE} DESTINATION slycot)
-install(FILES ${PYSOURCE} DESTINATION slycot)
+install(TARGETS ${SLYCOT_MODULE} DESTINATION ${PYTHON_RELATIVE_SITE_PACKAGES_DIR}/slycot)
+install(FILES ${PYSOURCE} DESTINATION ${PYTHON_RELATIVE_SITE_PACKAGES_DIR}/slycot)
add_subdirectory(tests)
diff --git a/slycot/tests/CMakeLists.txt b/slycot/tests/CMakeLists.txt
index c97cb50..7de8521 100644
--- a/slycot/tests/CMakeLists.txt
+++ b/slycot/tests/CMakeLists.txt
@@ -3,4 +3,4 @@ set(PYSOURCE
__init__.py test.py test_sg02ad.py test_sg03ad.py test_tb05ad.py
test_td04ad.py)
-install(FILES ${PYSOURCE} DESTINATION slycot/tests)
+install(FILES ${PYSOURCE} DESTINATION ${PYTHON_RELATIVE_SITE_PACKAGES_DIR}/slycot/tests) |
Hi,
I recently tried to install slycot via pip. Before that I installed the following dependencies:
Everything installs without any errors, but when I am trying to import slycot, I get the following error message:
ModuleNotFoundError: No module named 'slycot'
Am I missing something?
The text was updated successfully, but these errors were encountered: