etetoolkit / ete

Python package for building, comparing, annotating, manipulating and visualising trees. It provides a comprehensive API and a collection of command line tools, including utilities to work with the NCBI taxonomy tree.
http://etetoolkit.org
GNU General Public License v3.0
795 stars 214 forks source link

run ete3 with jupyter notebook in win7 system #387

Closed orangeSi closed 6 years ago

orangeSi commented 6 years ago

hi~ I install ete3 in a remote linux computer, and want to run ete3 with jupyter in another win7 system computer by connect the ete3 of remote linux computer, like this:

jupyter notebook --no-browser --port 8889  # in linux computer
ssh  -N -L localhost:8888:localhost:8889 user@linux_node_ip # in win7 computer

then visit localhost:8888 in win7 broswer to use notebook with ete3, but when I run ete3.Tree.render in win7 with notebook, that will kill the notebook kernel, and get error:

ETE: cannot connect to X server 0.0

I have installed xming in win7, and tried these:

export DISPLAY=localhost:0:0
import os
os.environ['QT_QPA_PLATFORM']='offscreen'

but all still get the same error.

Thanks for help~

Regard Si~

orangeSi commented 6 years ago

I resolved this by

download https://github.com/openwebos/qt/tree/master/lib/fonts to get fonts directory 
mv fonts to xx/envs/your_envname/lib/
import os
os.environ['QT_QPA_PLATFORM']='offscreen'