Closed ebw44 closed 3 years ago
This looks like the same issue we're seeing in our CI for conda-forge builds when MacOS and Windows are introduced. Can you try to run pip install -v perspective-python
in a non-conda environment and post the logs? Thanks!
In conda base environment pip install -v perspective-python
works but:
Python 3.7.7 (default, May 6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import perspective
CRITICAL:root:Failed to import C++ bindings for Perspective probably as it could not be built for your architecture (check install logs for more details).
You can still use `PerspectiveWidget` in client mode using JupyterLab.
Traceback (most recent call last):
File "C:\Users\XXXX\miniconda3\lib\site-packages\perspective\libpsp.py", line 21, in <module>
from .table import * # noqa: F401, F403
File "C:\Users\XXXX\miniconda3\lib\site-packages\perspective\table\__init__.py", line 9, in <module>
from .table import Table
File "C:\Users\XXXX\miniconda3\lib\site-packages\perspective\table\table.py", line 11, in <module>
from .view import View
File "C:\Users\XXXX\miniconda3\lib\site-packages\perspective\table\view.py", line 15, in <module>
from ._data_formatter import to_format, _parse_format_options
File "C:\Users\XXXX\miniconda3\lib\site-packages\perspective\table\_data_formatter.py", line 12, in <module>
from .libbinding import get_data_slice_zero, get_data_slice_one, get_data_slice_two, \
ModuleNotFoundError: No module named 'perspective.table.libbinding'
I think that installation is from visual studio
If I use boost library supplied with conda (I couldn't found something similar with pip and I'm still waiting for vcpkg to update) using set BOOST_ROOT=C:\Users\XXXXX\miniconda3\Library'
. I get the same error than above:
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import perspective
CRITICAL:root:Failed to import C++ bindings for Perspective probably as it could not be built for your architecture (check install logs for more details).
You can still use `PerspectiveWidget` in client mode using JupyterLab.
Traceback (most recent call last):
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python37\lib\site-packages\perspective\libpsp.py", line 21, in <module>
from .table import * # noqa: F401, F403
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python37\lib\site-packages\perspective\table\__init__.py", line 9, in <module>
from .table import Table
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python37\lib\site-packages\perspective\table\table.py", line 11, in <module>
from .view import View
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python37\lib\site-packages\perspective\table\view.py", line 15, in <module>
from ._data_formatter import to_format, _parse_format_options
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python37\lib\site-packages\perspective\table\_data_formatter.py", line 12, in <module>
from .libbinding import get_data_slice_zero, get_data_slice_one, get_data_slice_two, \
ModuleNotFoundError: No module named 'perspective.table.libbinding'
It seems related to the #937. Looking at both the previous installation 'lib\site-packages\perspective\table\' they both contain some libbinding.so, libpsp.so, libtbb.so when I would expect some .dll. And they cannot be open by 'dependency walker' or dumpbin:
dumpbin libpsp.so
Microsoft (R) COFF/PE Dumper Version 14.16.27030.1
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file libpsp.solibpsp.so : warning LNK4048: Invalid format file; ignored
Here is the full output of the pip install -v perspective-python
inside conda base environment https://pastebin.com/HWma9NTy
I tried to use PerspectiveWidget in a jupyterlab after running succesfully jupyter labextension install @finos/perspective-jupyterlab
from datetime import date, datetime
from perspective import PerspectiveWidget
data = {
"int": [i for i in range(4)],
"float": [i * 1.25 for i in range(4)],
"str": ["a", "b", "c", "d"],
"bool": [True, False, True, False],
"date": [date.today() for i in range(4)],
"datetime": [datetime.now() for i in range(4)]
}
widget = PerspectiveWidget(data, row_pivots=["int"], columns=["int", "float"])
widget
The "drop_target_inner" div in the cell output div is empty and I get the error below in Chrome consol
Error: widget model not found
at y.get_model (manager.js:375)
at h.renderModel (renderer.js:38)
renderModel @ vendors~main.7ac0790ad861475d524e.js:2
async function (async)
renderModel @ vendors~main.7ac0790ad861475d524e.js:2
_rerender @ vendors~main.7ac0790ad861475d524e.js:2
f @ vendors~main.7ac0790ad861475d524e.js:2
l @ vendors~main.7ac0790ad861475d524e.js:2
e.emit @ vendors~main.7ac0790ad861475d524e.js:2
restoreWidgets @ vendors~main.7ac0790ad861475d524e.js:2
async function (async)
restoreWidgets @ vendors~main.7ac0790ad861475d524e.js:2
y @ vendors~main.7ac0790ad861475d524e.js:2
J @ vendors~main.7ac0790ad861475d524e.js:2
createNew @ index.js:38
(anonymous) @ index.js:38
l @ index.js:38
_initializeWidget @ index.js:38
createWidget @ index.js:38
_createOrOpenDocument @ index.js:38
open @ index.js:38
openOrReveal @ index.js:38
(anonymous) @ vendors~main.7ac0790ad861475d524e.js:2
Promise.then (async)
execute @ vendors~main.7ac0790ad861475d524e.js:2
e.execute @ vendors~main.7ac0790ad861475d524e.js:2
(anonymous) @ index.js:38
restore @ index.js:38
async function (async)
restore @ index.js:38
restore @ vendors~main.7ac0790ad861475d524e.js:2
restore @ vendors~main.7ac0790ad861475d524e.js:2
$ @ index.js:38
(anonymous) @ vendors~main.7ac0790ad861475d524e.js:2
Promise.then (async)
e.activatePlugin @ vendors~main.7ac0790ad861475d524e.js:2
e.resolveRequiredService @ vendors~main.7ac0790ad861475d524e.js:2
(anonymous) @ vendors~main.7ac0790ad861475d524e.js:2
e.activatePlugin @ vendors~main.7ac0790ad861475d524e.js:2
e.resolveRequiredService @ vendors~main.7ac0790ad861475d524e.js:2
(anonymous) @ vendors~main.7ac0790ad861475d524e.js:2
e.activatePlugin @ vendors~main.7ac0790ad861475d524e.js:2
(anonymous) @ vendors~main.7ac0790ad861475d524e.js:2
e.start @ vendors~main.7ac0790ad861475d524e.js:2
o @ main.2e41c4c6b41e87fc8253.js:1
load (async)
ANye @ main.2e41c4c6b41e87fc8253.js:1
a @ main.2e41c4c6b41e87fc8253.js:1
0 @ main.2e41c4c6b41e87fc8253.js:1
a @ main.2e41c4c6b41e87fc8253.js:1
r @ main.2e41c4c6b41e87fc8253.js:1
i @ main.2e41c4c6b41e87fc8253.js:1
(anonymous) @ vendors~main.7ac0790ad861475d524e.js:2
To summarize the linker issue doesn't happen when building outside a conda environment. But I'm facing #937, and I will probably wait for the conda-forge package. I'm happy to close this issue, except if you want me to run some tests to fix the conda environment build issue.
Thanks
Yeah, it should not be building with the .so extension on Windows. We'll take a look at this issue - @timkpaine is more knowledgable about the Jupyterlab/Windows side. Thanks for the detailed report - it is super helpful. We can keep this issue open until it's proven fixed.
It's not building those they're there from the dist
From the conda-forge linux dist? I assumed if there wasn't a conda-forge package built for the platform, then it would just fail at install time. I can't imagine it's picking up the .so from the sdist?
From the pastebin logs it looks like libpsp.dll
is being built:
Creating library C:/Users/XXXX/AppData/Local/Temp/pip-install-vznza_vs/perspective-python/build/temp.win-amd64-3.7/Release/Release/psp.lib and object C:/Users/DavyMoyon/AppData/Local/Temp/pip-install-vznza_vs/perspective-python/build/temp.win-amd64-3.7/Release/Release/psp.exp
psp.vcxproj -> C:\Users\XXXX\AppData\Local\Temp\pip-install-vznza_vs\perspective-python\build\temp.win-amd64-3.7\Release\Release\libpsp.dll
but then it isn't being copied out of the temp.win-amd64-3.77
folder into the lib
or bdist
folder. That may be the issue here.
The "can't find arrow_python.lib" issue is definitely real for Conda windows and mac.
So doing a pip install --no-clean -v perspective-python
to keep the .dll files and copying them from the build folder into the table folder (where the .so are), I can now import perspective
with no warning or error. And the PerspectiveWidget is working into jupyterLab.
Glad to hear it. We are working on streamlining the install process + getting proper wheels built, but I am unsure why the .so
files are included in the source distribution this time around.
So doing a
pip install --no-clean -v perspective-python
to keep the .dll files and copying them from the build folder into the table folder (where the .so are), I can nowimport perspective
with no warning or error. And the PerspectiveWidget is working into jupyterLab.
I'm doing the same steps, but still getting "CRITICAL:root:Failed to import C++ bindings for Perspective probably as it could not be built for your architecture". Wich exactly .dll files do i need to copy and where to put them?
@sc1f theyve always been there since we build hybrid in place, never got around to hooking a clean script before sdist but it shouldn't matter as they are rebuilt or ignored depending on the platform
So doing a
pip install --no-clean -v perspective-python
to keep the .dll files and copying them from the build folder into the table folder (where the .so are), I can nowimport perspective
with no warning or error. And the PerspectiveWidget is working into jupyterLab.I'm doing the same steps, but still getting "CRITICAL:root:Failed to import C++ bindings for Perspective probably as it could not be built for your architecture". Wich exactly .dll files do i need to copy and where to put them?
Here is a the list: libbinding.pyd, libpsp.dll, tbb.dll And in my case (miniconda base installation in User folder) I copied them into C:\Users\XXXXX\miniconda3\Lib\site-packages\perspective\table (where the libbinding.so, libpsp.so and libtbb.so were)
I am in linux container environment and have the same error. Are there any prerequisites for linux specifically. It is a new container so I don't have any c++ libraries installed. Could that be the reason I am receiving this PEP517 build error?
We've made some improvements in this space in https://github.com/finos/perspective/pull/1193 and https://github.com/finos/perspective/pull/1163
Bug Report
Steps to Reproduce:
there is a linking error related to 'arrow_python.lib' even if that file is available in 'C:\Users\XXXXX\miniconda3\envs\perspective\Library\lib' and seems to be found by cmake:
Actual Result:
Environment:
Windows 10 new conda environment with