Bonjour à tous,
j'ai envie de développer un petit script python pour remplir automatiquement mes attestations de déplacement et rajouter une signature scannée en bas du document.
En farfouillant un peu, je crois que le paquet pymupdf semble bien remplir cette tâche.
Sur PyPi (auquel se connecte pip si j'ai bien compris ?), le paquet est en version 1.18.3 (daté du 9 novembre 2020)
Sur Anaconda en revanche, le paquet n'est disponible que sur un
dépôt tiers "tc06580" et est en version 1.17.0
$ conda search -c tc06580 pymupdf
Loading channels: done
# Name Version Build Channel
pymupdf 1.17.0 py36_0 tc06580
Du coup, quand je tente une installation naïve, ça bugue (version de Python incompatible)
$ conda install -c tc06580 pymupdf
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- pymupdf -> python[version='>=3.6,<3.7.0a0']
Your python: python=3.8.5
Bon pas grave, j'ai réinstallé mon environnement virtuel avec un python un peu plus ancien
$ conda install python=3.6.12
[...]
$ python --version
Python 3.6.12 :: Anaconda, Inc.
$ conda install -c tc06580 pymupdf
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Bon et bien là, je ne comprends pas du tout... Il me dit qu'il existe des conflits mais ne me les affiche pas ?!
Qu'en pensez-vous ? Toute cette aventure soulève plusieurs questions de ma part...
1) Déjà, ai-je identifié le bon paquet pour ce que je souhaite faire (ajout de texte et d'image sur un pdf)
2) Pourquoi est-ce que mon conda install ne fonctionne pas ??
3) Les dépôt tiers (ici "tc06580") sont-ils fiables ? Se peut-il que quelqu'un y dépose du code malicieux ?
4) Eventuellement, je pourrais passer par pip dans mon environnement conda, voire installer le paquet *manuellement* dans sa dernière version... Mais j'aimerais avant cela comprendre pourquoi conda install foire...
Merci d'avance pour vos lumières 🙂
D.