Skip to content
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

Compiled extension not installed #2

Open
FabricioS opened this issue Feb 7, 2018 · 1 comment
Open

Compiled extension not installed #2

FabricioS opened this issue Feb 7, 2018 · 1 comment

Comments

@FabricioS
Copy link
Owner

According to fbl1991 in issue #1 :

But, when I have run the installation command. The _im7.so wasn't copied to the python library folder. Thus, I got the error 'OSError: dlopen(/Library/Python/2.7/site-packages/libim7/_im7.so, 6): image not found'. So I copy it manually. Could you tell me why?

On my machine, python3 setup.py install tells

running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "libim7._im7" sources
building data_files sources
build_src: building npy-pkg config files
running build_py
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
running install_lib
creating /usr/local/lib/python3.6/dist-packages/libim7
copying build/lib.linux-x86_64-3.6/libim7/libim7.py -> /usr/local/lib/python3.6/dist-packages/libim7
copying build/lib.linux-x86_64-3.6/libim7/init.py -> /usr/local/lib/python3.6/dist-packages/libim7
byte-compiling /usr/local/lib/python3.6/dist-packages/libim7/libim7.py to libim7.cpython-36.pyc
byte-compiling /usr/local/lib/python3.6/dist-packages/libim7/init.py to init.cpython-36.pyc
running install_data
creating /usr/local/lib/python3.6/dist-packages/libim7/test
copying test/test_SOV2_01_1000.pdf -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/test_IMX.pdf -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/test_IMX.IM7 -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/test_PTV_B00013.py -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/SOV2_01_100_davis.nc -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/test_IMX.imx -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/SOV2_01_100_davis.txt -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/PTV_B00013.bmp -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/SOV2_01_100_davis.dat -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/test_SOV2_01_100.py -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/test_SOV2_01_1002.pdf -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/test_IMX.py -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/test_SOV2_01_1001.pdf -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/SOV2_01_100_davis.VC7 -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/libim7x.py -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/PTV_B00013.VC7 -> /usr/local/lib/python3.6/dist-packages/libim7/test/
copying test/SOV2_01_100_pivmat.mat -> /usr/local/lib/python3.6/dist-packages/libim7/test/
running install_egg_info
Writing /usr/local/lib/python3.6/dist-packages/libim7-0.2.egg-info
running install_clib
customize UnixCCompiler

It in fact does not copy the compiled extension file to the install dir.

@FabricioS
Copy link
Owner Author

By now, the setup.py script relies on the numpy.distutils.Configuration and its add_extension method. The documentation also mentions the add_installed_library which, contrary to add_extension and add_library, does install the compiled file.

Before any change, I must think again about whether it is required to use numpy distutils here (and why I did it many years ago...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant