Ask Your Question
1

Import error with pydotplus

asked 2018-02-12 14:55:11 +0100

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 11:49:12 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-02-13 11:38:01 +0100

tmonteil gravatar image

updated 2018-02-13 11:38:30 +0100

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 12:10:35 +0100 )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 14:07:21 +0100 )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 09:44:11 +0100 )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 14:55:11 +0100

Seen: 1,508 times

Last updated: Feb 13 '18