Accueil » Python » Forums Python » Forum Twisted Python » Mauvaise intallation de Twisted ?

 • Mauvaise intallation de Twisted ?

Document Actions
Réponses: 6   Visites: 320
Up one level
Vous devez être un membre enregistré pour contribuer sur ce forum. Inscrivez-vous maintenant
Sujet précédent | Sujet suivant

 • Mauvaise intallation de Twisted ?

Posté par ornythorink le 01/06/2010 00:37
Bonsoir Je voudrais porter un projet basé sur Scrapy de windows à unix (debian) J'ai donc installé Twisted et les composants demandés. Comme ça:
code:
aptitude install python-twisted
idem avec les autres no problèmme jusque là Je lance le setup.py de Scrapy idem toujours pas de soucis Mais quand je crée un projet j'ai ça
code:
/usr/local/bin# scrapy-ctl.py startproject test Traceback (most recent call last):   File "/usr/local/bin/scrapy-ctl.py", line 3, in      from scrapy.command.cmdline import execute   File "/usr/local/lib/python2.5/site-packages/scrapy/command/cmdline.py", line 9, in      from scrapy import log   File "/usr/local/lib/python2.5/site-packages/scrapy/log.py", line 9, in      from twisted.python import log ImportError: No module named twisted.python /usr/local/bin#
Est-ce que j'aurai loupé l'installation de twisted ? une piste? Merci pour votre aide.

 • Re: Mauvaise intallation de Twisted ?

Posté par lstep le 01/06/2010 01:29
Hmm, on dirait, oui.
Si tu essayes de faire un "import twisted" dans un shell python,
est-ce que cela fonctionne ?

help Re: Mauvaise intallation de Twisted ?

Posté par lstep le 01/06/2010 01:33
Je vois que ton python ne semble pas être le standard fourni sur ta distribution (debian ou ubuntu?), vu que ton site-packages se trouve dans /usr/local/lib/python2.5/site-packages.

Si c'est le cas, alors c'est normale que cela ne fonctionne pas, ton package a installé twisted dans /usr/lib/python2.5/site-packages, qui ne doit pas être vu par ton python custom...

Ce que tu peux faire, c'est soit récupérer twisted et le compiler toi même ("easy_install twisted";), ou essayer de faire un lien de ton /usr/lib/python2.5/site-packages/twisted vers le /usr/local/lib/python2.5/site-packages.
Peut-être en bidouillant ton PYTHONPATH aussi, ça marcherait, mais pas sûr.

help Re: Mauvaise intallation de Twisted ?

Posté par lstep le 01/06/2010 01:34
Je vois que ton python ne semble pas être le standard fourni sur ta distribution (debian ou ubuntu?), vu que ton site-packages se trouve dans /usr/local/lib/python2.5/site-packages.

Si c'est le cas, alors c'est normal que cela ne fonctionne pas, ton package a installé twisted dans /usr/lib/python2.5/site-packages, qui ne doit pas être vu par ton python custom...

Ce que tu peux faire, c'est soit récupérer twisted et le compiler toi même ("easy_install twisted";), ou essayer de faire un lien de ton /usr/lib/python2.5/site-packages/twisted vers le /usr/local/lib/python2.5/site-packages.
Peut-être en bidouillant ton PYTHONPATH aussi, ça marcherait, mais pas sûr.

 • Re: Mauvaise intallation de Twisted ?

Posté par ornythorink le 01/06/2010 13:27
Bonjour

Tu dois avoir raison. Vu qu'effectivement il a a été installé de base dans local, et que j'ai du faire des manipulations supplémentaire pour résoudre ce premier problème.
Je tente une de tes solutions et si ça marche je clos le topic.

Merci beaucoup.

tool Re: Mauvaise intallation de Twisted ?

Posté par ornythorink le 01/06/2010 15:05
Bon...

J'ai voulu refaire une compilation propre du python 2.5

Mais je crois que je gère mal ça ou les symlinks vers l'interpreteur python

pour la compilation je fais

./configure --prefix=/usr
make
make install

mais il utilise toujours le /usr/local/bin/python (je teste en faisant which python

il y a quelque chose de pourri dans mes symlinks mais je ne vois pas quoi

J'ai cherché un bon tutoriel pour faire cette install propre mais je n'ai pas encore trouvé mon bonheur.

Ce qui s'en approche le plus c'est cette page:
http://forum.ubuntu-fr.org/viewtopic.php?id=69395

any idea ?

question Re: Mauvaise intallation de Twisted ?

Posté par ornythorink le 03/06/2010 09:10
Bonjour

C'est mieux ;) J'ai un python propre 2.5
Maintenant j'arrive presque à installer Twisted jusqu'à ce que python-serial et les paquets suivants plantent avec ce message INFO: using unsupported version '/usr/bin/python2.5'

je mets la totalité en dessous:
code:
de732:/usr/bin# aptitude install python-twisted
Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done
Building tag database... Done
The following NEW packages will be automatically installed:
  libgdk-pixbuf2 libglade0 libxml1 python-glade-1.2 python-gtk-1.2 python-pam python-pyopenssl python-serial python-twisted-bin python-twisted-conch
  python-twisted-core python-twisted-lore python-twisted-mail python-twisted-names python-twisted-news python-twisted-runner python-twisted-web
  python-twisted-words
The following NEW packages will be installed:
  libgdk-pixbuf2 libglade0 libxml1 python-glade-1.2 python-gtk-1.2 python-pam python-pyopenssl python-serial python-twisted python-twisted-bin
  python-twisted-conch python-twisted-core python-twisted-lore python-twisted-mail python-twisted-names python-twisted-news python-twisted-runner
  python-twisted-web python-twisted-words
0 packages upgraded, 19 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/2615kB of archives. After unpacking 12.9MB will be used.
Do you want to continue??]
Writing extended state information... Done
Selecting previously deselected package libgdk-pixbuf2.
(Reading database ... 193617 files and directories currently installed.)
Unpacking libgdk-pixbuf2 (from .../libgdk-pixbuf2_0.22.0-11_amd64.deb) ...
Selecting previously deselected package libxml1.
Unpacking libxml1 (from .../libxml1_1%3a1.8.17-14+etch1_amd64.deb) ...
Selecting previously deselected package libglade0.
Unpacking libglade0 (from .../libglade0_1%3a0.17-8_amd64.deb) ...
Selecting previously deselected package python-gtk-1.2.
Unpacking python-gtk-1.2 (from .../python-gtk-1.2_0.6.12-8_amd64.deb) ...
Selecting previously deselected package python-glade-1.2.
Unpacking python-glade-1.2 (from .../python-glade-1.2_0.6.12-8_amd64.deb) ...
Selecting previously deselected package python-pam.
Unpacking python-pam (from .../python-pam_0.4.2-10.4_amd64.deb) ...
Selecting previously deselected package python-pyopenssl.
Unpacking python-pyopenssl (from .../python-pyopenssl_0.6-2.3_amd64.deb) ...
Selecting previously deselected package python-serial.
Unpacking python-serial (from .../python-serial_2.2-4_all.deb) ...
Selecting previously deselected package python-twisted-bin.
Unpacking python-twisted-bin (from .../python-twisted-bin_2.4.0-3_amd64.deb) ...
Selecting previously deselected package python-twisted-core.
Unpacking python-twisted-core (from .../python-twisted-core_2.4.0-3_all.deb) ...
Selecting previously deselected package python-twisted-web.
Unpacking python-twisted-web (from .../python-twisted-web_0.6.0-1_all.deb) ...
Selecting previously deselected package python-twisted-lore.
Unpacking python-twisted-lore (from .../python-twisted-lore_0.2.0-2_all.deb) ...
Selecting previously deselected package python-twisted-mail.
Unpacking python-twisted-mail (from .../python-twisted-mail_0.3.0-1_all.deb) ...
Selecting previously deselected package python-twisted-names.
Unpacking python-twisted-names (from .../python-twisted-names_0.3.0-1_all.deb) ...
Selecting previously deselected package python-twisted-news.
Unpacking python-twisted-news (from .../python-twisted-news_0.2.0-1_all.deb) ...
Selecting previously deselected package python-twisted-runner.
Unpacking python-twisted-runner (from .../python-twisted-runner_0.2.0-1.1_amd64.deb) ...
Selecting previously deselected package python-twisted-words.
Unpacking python-twisted-words (from .../python-twisted-words_0.4.0-2.1_all.deb) ...
Selecting previously deselected package python-twisted-conch.
Unpacking python-twisted-conch (from .../python-twisted-conch_1%3a0.7.0-1_all.deb) ...
Selecting previously deselected package python-twisted.
Unpacking python-twisted (from .../python-twisted_2.4.0-3_all.deb) ...
Setting up libgdk-pixbuf2 (0.22.0-11) ...

Setting up libxml1 (1.8.17-14+etch1) ...

Setting up libglade0 (0.17-8) ...

Setting up python-gtk-1.2 (0.6.12-8) ...
Setting up python-glade-1.2 (0.6.12-8) ...
Setting up python-pam (0.4.2-10.4) ...
Setting up python-pyopenssl (0.6-2.3) ...

Setting up python-serial (2.2-4) ...
INFO: using unsupported version '/usr/bin/python2.5'

Setting up python-twisted-bin (2.4.0-3) ...
Setting up python-twisted-core (2.4.0-3) ...
INFO: using unsupported version '/usr/bin/python2.5'

Setting up python-twisted-web (0.6.0-1) ...
INFO: using unsupported version '/usr/bin/python2.5'

Setting up python-twisted-lore (0.2.0-2) ...
INFO: using unsupported version '/usr/bin/python2.5'

Setting up python-twisted-mail (0.3.0-1) ...
INFO: using unsupported version '/usr/bin/python2.5'

Setting up python-twisted-names (0.3.0-1) ...
INFO: using unsupported version '/usr/bin/python2.5'

Setting up python-twisted-news (0.2.0-1) ...
INFO: using unsupported version '/usr/bin/python2.5'

Setting up python-twisted-runner (0.2.0-1.1) ...
INFO: using unsupported version '/usr/bin/python2.5'

Setting up python-twisted-words (0.4.0-2.1) ...
INFO: using unsupported version '/usr/bin/python2.5'

Setting up python-twisted-conch (0.7.0-1) ...
INFO: using unsupported version '/usr/bin/python2.5'

Setting up python-twisted (2.4.0-3) ...


Admettons que Scrapy (que je veux installer) requiert la version 2.5, ça me parait surprenant dans ce cas là que Twisted ne supporte pas python au delà de la 2.4.