Ask Your Question
1

Import error with pydotplus

asked 7 years ago

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

Preview: (hide)

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 ( 7 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 7 years ago

tmonteil gravatar image

updated 7 years ago

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.

Preview: (hide)
link

Comments

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

luno_T gravatar imageluno_T ( 7 years ago )

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 ( 7 years ago )

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 ( 7 years ago )

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: 7 years ago

Seen: 1,547 times

Last updated: Feb 13 '18