Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Problem mit python paket
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Simonheld
Apprentice
Apprentice


Joined: 20 Nov 2005
Posts: 151
Location: Deepest Black Bavaria

PostPosted: Thu Jun 06, 2013 11:30 am    Post subject: [solved] Problem mit python paket Reply with quote

Hallo,

ich benutze das python Paket "dev-python/pyx" zum erstellen von Grafiken. Seit meiner kürtlichen Neuinstallation. Wird das paket von python nicht mehr gefunden.

Code:

Traceback (most recent call last):
  File "TablesNoExzitons.py", line 4, in <module>
    from pyx import *
ImportError: No module named pyx


Das Paket ist allerdings installiert.

Code:

*  dev-python/pyx
      Latest version available: 0.12.1-r1
      Latest version installed: 0.12.1-r1
      Size of files: 548 kB
      Homepage:      http://pyx.sourceforge.net/
      Description:   Python package for the generation of encapsulated PostScript figures
      License:       GPL-2



Ein Blick in /usr/lib/python3.2/site-packages/ zeigt allerdings, dass das Paket nur in /usr/lib/python2.7/site-packages/ zu finden ist.


Warum finde ich das nicht in python3.2 ? Wie kann ich das beheben ?

Vielen Dank,

Simon


Last edited by Simonheld on Thu Jun 06, 2013 1:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
Simonheld
Apprentice
Apprentice


Joined: 20 Nov 2005
Posts: 151
Location: Deepest Black Bavaria

PostPosted: Thu Jun 06, 2013 12:28 pm    Post subject: Reply with quote

Habe "python-updater" ausgeführt, der hat 13 Pakete neuinstalliert, unter anderem "pyx" aber gebrachte hat es nichts ...
Back to top
View user's profile Send private message
Simonheld
Apprentice
Apprentice


Joined: 20 Nov 2005
Posts: 151
Location: Deepest Black Bavaria

PostPosted: Thu Jun 06, 2013 12:43 pm    Post subject: Reply with quote

Weiß nicht obs irgendwas hilft:

Wenn ich vor der import-Anweisung

Code:
sys.path.insert(0, "/usr/lib/python2.7/site-packages/")


einfüge, kommt ein Fehler
Code:
Traceback (most recent call last):
  File "TablesNoExzitons.py", line 5, in <module>
    from pyx import *
  File "/usr/lib/python2.7/site-packages/pyx/__init__.py", line 32, in <module>
    import version
ImportError: No module named version


Inhalt der Datei /usr/lib/python2.7/site-packages/pyx/__init__.py :
Code:
import version
__version__ = version.version

__all__ = ["attr", "box", "bitmap", "canvas", "color", "connector", "deco", "deformer", "document",
           "epsfile", "graph", "mesh", "metapost", "path", "pattern", "pdfextra", "style", "trafo", "text", "unit"]


# automatically import main modules into pyx namespace
for module in __all__:
    __import__(module, globals(), locals(), [])
Back to top
View user's profile Send private message
Simonheld
Apprentice
Apprentice


Joined: 20 Nov 2005
Posts: 151
Location: Deepest Black Bavaria

PostPosted: Thu Jun 06, 2013 1:49 pm    Post subject: Reply with quote

Ok ich habe wieder etwas gelernt:

Wenn ich das Script mit
Code:
python2 schript.py

statt mit
Code:
python schript.py

ausführe funktioniert es problemlos. Das beantwortet zwar nicht wirklich meine Frage aber es beseitigt mein Problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum