Problem installing on ubuntu ("No module named _gv")

Asked by aakaz

When I install the package through apt-get, and then try to "import gv" from python terminal I get the error "No module named _gv".

The error in more detail:

File "gv.py", line 25, in <module>
    _gv = swig_import_helper()
  File "gv.py", line 17, in swig_import_helper
    import _gv
ImportError: No module named _gv

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu graphviz Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
aakaz (ahmad-kaz) said :
#1

I am aware that I left out lots of details, please let me know which are the ones you need.

Many thanks.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Can you give the output of:

lsb_release -a; uname -a

Thanks

Revision history for this message
aakaz (ahmad-kaz) said :
#3

Thank you for your prompt response. The following is the output:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
Linux my-ubuntu 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4 11:12:07 UTC 2012 x86_64 GNU/Linux

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

Ok, what is the output of:

sudo apt-get clean; sudo apt-get update; sudo apt-get install graphviz

Thanks

Revision history for this message
aakaz (ahmad-kaz) said :
#5

For sudo apt-get update, the last bit of the output:

Fetched 1,965kB in 2s (940kB/s)
Reading package lists... Done
W: GPG error: http://packages.medibuntu.org lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2EBC26B60C5A2783
W: Duplicate sources.list entry http://archive.canonical.com/ lucid/partner Packages (/var/lib/apt/lists/archive.canonical.com_dists_lucid_partner_binary-amd64_Packages)
W: Duplicate sources.list entry http://archive.canonical.com/ lucid/partner Packages (/var/lib/apt/lists/archive.canonical.com_dists_lucid_partner_binary-amd64_Packages)
W: Duplicate sources.list entry http://archive.canonical.com/ lucid/partner Packages (/var/lib/apt/lists/archive.canonical.com_dists_lucid_partner_binary-amd64_Packages)

Then, for sudo apt-get install graphviz:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  graphviz-doc
The following NEW packages will be installed
  graphviz
0 upgraded, 1 newly installed, 0 to remove and 44 not upgraded.
Need to get 435kB of archives.
After this operation, 1,208kB of additional disk space will be used.
Get: 1 http://gb.archive.ubuntu.com/ubuntu/ lucid/main graphviz 2.20.2-8ubuntu3 [435kB]
Fetched 435kB in 0s (820kB/s)
Selecting previously deselected package graphviz.
(Reading database ... 207112 files and directories currently installed.)
Unpacking graphviz (from .../graphviz_2.20.2-8ubuntu3_amd64.deb) ...
Processing triggers for man-db ...
Setting up graphviz (2.20.2-8ubuntu3) ...

Thanks again!

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring

Will import the medibuntu keyring which is part of the medibuntu repo adding process (no idea why you missed that out but it is easily fixed)

Can you give the output of:

grep -i partner /etc/apt/sources.list

Thanks

Revision history for this message
aakaz (ahmad-kaz) said :
#7

OK carried out your suggested nifty fix, big thanks.

Output of grep -i partner /etc/apt/sources.list

## 'partner' repository.
# deb http://archive.canonical.com/ubuntu lucid partner
# deb-src http://archive.canonical.com/ubuntu lucid partner
deb http://archive.canonical.com/ lucid partner
deb http://archive.canonical.com/ lucid partner
deb http://archive.canonical.com/ lucid partner
deb http://archive.canonical.com/ lucid partner

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8

ok run:

gksudo gedit /etc/apt/sources.list

and delete THREE of the:

deb http://archive.canonical.com/ lucid partner

lines. Save the new file, close gedit then run:

sudo apt-get update. Is it smooth now?

Revision history for this message
aakaz (ahmad-kaz) said :
#9

Many many thanks, it is smooth now. But sadly "import gv" still doesn't work in python terminal...?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#10

Can you help with this problem?

Provide an answer of your own, or ask aakaz for more information if necessary.

To post a message you must log in.