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
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?
Am 20.05.2019 um 10:32 schrieb jgspiro ***@***.***>:
I fixed that, because I had the same issue : #62
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
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 (python setup.py bdist_wheel), install it (pip install slycot-0.3.4.9-cp37-cp37m-linux_x86_64.whl), and then import slycot works, and pip show -f slycot is
Name: slycot
Version: 0.3.4.9
Summary: Slycot: a wrapper for the SLICOT control and systems library
Home-page: https://github.com/python-control/Slycot
Author: Enrico Avventi et al.
Author-email: None
License: GPL-2.0
Location: /home/rory/.miniconda3/envs/slycot-via-pip/lib/python3.7/site-packages
Requires:
Required-by:
Files:
slycot-0.3.4.9.dist-info/COPYING
slycot-0.3.4.9.dist-info/INSTALLER
slycot-0.3.4.9.dist-info/METADATA
slycot-0.3.4.9.dist-info/RECORD
slycot-0.3.4.9.dist-info/WHEEL
slycot-0.3.4.9.dist-info/top_level.txt
slycot/__init__.py
slycot/__pycache__/__init__.cpython-37.pyc
slycot/__pycache__/analysis.cpython-37.pyc
slycot/__pycache__/examples.cpython-37.pyc
slycot/__pycache__/math.cpython-37.pyc
slycot/__pycache__/synthesis.cpython-37.pyc
slycot/__pycache__/transform.cpython-37.pyc
slycot/__pycache__/version.cpython-37.pyc
slycot/_wrapper.so
slycot/analysis.py
slycot/examples.py
slycot/math.py
slycot/synthesis.py
slycot/tests/__init__.py
slycot/tests/__pycache__/__init__.cpython-37.pyc
slycot/tests/__pycache__/test.cpython-37.pyc
slycot/tests/__pycache__/test_sg02ad.cpython-37.pyc
slycot/tests/__pycache__/test_sg03ad.cpython-37.pyc
slycot/tests/__pycache__/test_tb05ad.cpython-37.pyc
slycot/tests/__pycache__/test_td04ad.cpython-37.pyc
slycot/tests/test.py
slycot/tests/test_sg02ad.py
slycot/tests/test_sg03ad.py
slycot/tests/test_tb05ad.py
slycot/tests/test_td04ad.py
slycot/transform.py
slycot/version.py
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)
Activity
moorepants commentedon May 18, 2019
Probably isn't doing what you think it should. You should
apt install cmake.moorepants commentedon May 18, 2019
I take that back. It actually seems like cmake is packaged for installation via pypi: https://pypi.org/project/cmake/
nilsmelchert commentedon May 18, 2019
I also tried to install slycot from source which leads to the same issue.
Cmake is of course installed on my system.
moorepants commentedon May 18, 2019
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?
jgspiro commentedon May 20, 2019
I fixed that, because I had the same issue : #62
nilsmelchert commentedon May 20, 2019
roryyorke commentedon May 25, 2019
I don't think we've fixed this. It's related to #3, and is at least partly addressed by #64.
roryyorke commentedon May 25, 2019
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?
roryyorke commentedon May 25, 2019
With the diff below, I can build a wheel (
python setup.py bdist_wheel), install it (pip install slycot-0.3.4.9-cp37-cp37m-linux_x86_64.whl), and thenimport slycotworks, andpip show -f slycotisroryyorke commentedon Jun 21, 2019
This is fixed in #67, for Linux and (I think) OSX. Hopefully soon available in 0.3.5 (#70).
Please reopen if the bug is still there on 0.3.5.
bnavigator commentedon Jun 21, 2019
It's not mentioned in #67 but the fix is actually in commit 2e41c2f