Ask Your Question
1

Import error with pydotplus

asked 2018-02-12 07:55:11 -0500

luno_T gravatar image

Hello,

I am running Sagemath 7.3 on Linux. I would like to export a graph using the export function of the graph, but I get the error

ImportError: No module named pydotplus

The python module pydotplus was already installed with pip install pydotplus

I cannot find any help regarding this issue. Any suggestion?

Thank you in advance for your help

edit retag flag offensive close merge delete

Comments

Could you please provide all the commands you typed to reach this error. It might be usefull to have pydotplus being part of Sage, or at least some of its distros (i am considering installing it within Sage Debian Live).

tmonteil gravatar imagetmonteil ( 2018-02-13 04:49:12 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-02-13 04:38:01 -0500

tmonteil gravatar image

updated 2018-02-13 04:38:30 -0500

If you want to install pydotplus and use it from Sage, you have to install it withind Sage's virtual environment (which is disjoint from your system's Python install): for this, you have to type:

sage -pip install pydotplus

By the way, let me suggest to upgrade your Sage to a more recent version.

edit flag offensive delete link more

Comments

Many Thanks: it worked out. You're right, I need to upgrade sage on my laptop...

luno_T gravatar imageluno_T ( 2018-02-13 05:10:35 -0500 )edit

Great, couuld you please provide an example of use of this package in the context of Sage, maybe we could include it somehow.

tmonteil gravatar imagetmonteil ( 2018-02-13 07:07:21 -0500 )edit

If G is a graph then G.export_to_file("filname", "dot") will export the graph in the DOT Graph Description Language. This function calls pydotplus.

Is that the kind of example you were asking for?

luno_T gravatar imageluno_T ( 2018-02-14 02:44:11 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-02-12 07:55:11 -0500

Seen: 92 times

Last updated: Feb 13