Closed zwyber closed 4 years ago
ImportError Traceback (most recent call last)
<ipython-input-1-29fbef30cdcb> in <module>
----> 1 from lets_plot import *
[PATH_TO_VENV]venv\lib\site-packages\lets_plot\__init__.py in <module>
11 from .plot import *
12 from ._global_settings import LetsPlotSettings
---> 13 from .frontend_context import *
14
15 __all__ = (plot.__all__ +
[PATH_TO_VENV]venv\lib\site-packages\lets_plot\frontend_context\__init__.py in <module>
4 #
5
----> 6 from ._configuration import *
7
8 __all__ = _configuration.__all__
[PATH_TO_VENV]venv\lib\site-packages\lets_plot\frontend_context\_configuration.py in <module>
6
7 from ._frontend_ctx import FrontendContext
----> 8 from ._html_contexts import _create_html_frontend_context, _use_isolated_frame
9 from .._global_settings import get_global_bool
10 from ..plot.core import PlotSpec
[PATH_TO_VENV]venv\lib\site-packages\lets_plot\frontend_context\_html_contexts.py in <module>
5
6 from ._frontend_ctx import FrontendContext
----> 7 from ._jupyter_notebook_ctx import JupyterNotebookContext
8 from ._static_html_page_ctx import StaticHtmlPageContext
9 from .._global_settings import has_global_value, get_global_bool, HTML_ISOLATED_FRAME
[PATH_TO_VENV]venv\lib\site-packages\lets_plot\frontend_context\_jupyter_notebook_ctx.py in <module>
13
14 from ._frontend_ctx import FrontendContext
---> 15 from .. import _kbridge as kbr
16 from .._global_settings import get_global_str, has_global_value, is_production
17 from .._version import __version__
[PATH_TO_VENV]venv\lib\site-packages\lets_plot\_kbridge.py in <module>
5 from typing import Dict
6
----> 7 import lets_plot_kotlin_bridge
8
9 from ._type_utils import standardize_dict
ImportError: DLL load failed while importing lets_plot_kotlin_bridge: The specified module could not be found.```
Thank you for reporting this issue!
I suppose that you don't have any MinGW support on your Windows machine.
Could you try these steps, please:
conda create -n <env_name> python=3.8
conda activate <env_name>
conda install m2w64-toolchain
lets-plot
.Then try to import and use lets-plot
.
Added installation procedure to the README_PYTHON.md file for Windows users:
@zwyber have you tried the steps I mentioned above? Did it help in your problem?
Hi @VDovidaytis-HORIS , apologies for the late response! It was a busy week, I only had some time now to tinker with Python.
Indeed I had no MinGW on my laptop. I can confirm the steps you mentioned fixes the problem! The setup instructions are clear.
Remains a bit odd why the package can install with a missing MinGW toolchain without throwing an error during install. If possible, it would be nice to have the package fail to install without MinGW. Otherwise the current instructions are sufficiently clear!
Thank you for for the solution!
PS: Since I am familiar with R and the ggplot2 package, I tried ggsave()
out of habit. I noticed it was not implemented in lets-plot, instead using the export module. If you want to make the transition from R even smoother, you may want to consider adding a ggsave()
wrapper :)
@zwyber thanx for the feedback, I've created an issue regarding ggsave
wrapper: https://github.com/JetBrains/lets-plot/issues/122
Although we can only support device="svg"
at this time.
I greatly appreciate the effort to make a nice ggplot-like plotting library for Python! However, when installing and importing I got an ImportError:
ImportError: DLL load failed while importing lets_plot_kotlin_bridge: The specified module could not be found.
Environment:
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32
python -m venv venv
and activated itpip install jupyterlab ipython numpy pandas lets_plot
(installs lets_plot 1.3.0)from lets_plot import *
(as suggested)Results in an import error, full error is in the attached with the issue