ProLint / prolintpy

A python package for the automated analysis and visualization of lipid-protein interactions.
https://prolint.github.io/prolintpy
MIT License
5 stars 0 forks source link

import error #6

Open yang-guoli opened 2 years ago

yang-guoli commented 2 years ago

hi, i tried to install the prolintpy use your thirdth methods and success. But when i import the prolintpy, the error occur as follows: 屏幕截图 2022-04-11 195753

bisejdiu commented 2 years ago

I don't think I've seen this error before. Can you check what your Bokeh version is:

import bokeh
bokeh.__version__
1.4.0

ProLint relies on an old version of Bokeh. We've updated it internally and will push the update soon online, but for now you have to make sure that you use the 1.4.0 version.

yang-guoli commented 2 years ago

@bisejdiu The boketh version is 1.4.0. image

yang-guoli commented 2 years ago

I solved the probelm above by as follow: the code in the /../envs/prolint/lib/python3.7/site-packages/bokeh/document/document.py:

from jinja2 import Environment, Markup, FileSystemLoader

changing into: from jinja2 import Environment, FileSystemLoader from markupsafe import Markup . The methods according into: https://github.com/holoviz/panel/issues/3257

bisejdiu commented 2 years ago

Thank you for figuring this out and for posting it here! I'm keeping this issue open, if that's ok, in case anyone else encounters the same problem.

danielpastor97 commented 2 years ago

To solve this issue in the current version of prolintpy the file that you need to edit is:

/../anaconda3/envs/prolint/lib/python3.7/site-packages/bokeh/core/templates.py

and change the import line:

from jinja2 import Environment, Markup, FileSystemLoader

into:

from jinja2 import Environment, FileSystemLoader
from markupsafe import Markup

as was discussed above.