Last modified: 2014-05-27 01:51:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63824, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61824 - Document how to install Python modules in a tool's home directory/virtual environment
Document how to install Python modules in a tool's home directory/virtual env...
Status: NEW
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: Lowest enhancement
: ---
Assigned To: Marc A. Pelletier
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-23 16:47 UTC by Alessandro Brollo
Modified: 2014-05-27 01:51 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Alessandro Brollo 2014-02-23 16:47:23 UTC
Intention:
I'm building a script to upload into Internet Archive pdf files that need some previous painful manipulation (converting into tiffs, then cropped, splitted and sometines rotated); a good set of metadata (those needed for a good Book template) could be uploaded too. 




Reproducible: Didn't try
Comment 1 Alessandro Brollo 2014-02-23 16:49:29 UTC
I forgot to report the main information! Python package that allows Internet Archive management can be found here:

https://pypi.python.org/pypi/internetarchive
Comment 2 Alessandro Brollo 2014-03-04 23:15:39 UTC
After migrating into eqiad, local installation of internetarchive gives an ImportError and doesn't run any more. 

The new message into eqiad is:

from requests.auth import AuthBase
ImportError: cannot import name AuthBase

pip doesn't run in eqiad so we can't even try to fix the issue; careful global installation is needed.
Comment 3 MZMcBride 2014-03-05 07:58:03 UTC
Have you tried installing the Python package in your home directory? Is that possible?
Comment 4 Alessandro Brollo 2014-03-05 08:16:19 UTC
I tried, but pip seems lacking into eqiad; internetarchive installation is not simple, i.e. I got often a (random!) ImportError message when running my test python script with jsub, while I never got it running the same by itsource prompt. 

So, a global, careful installation of internetarchive module is a good idea; I think that a better idea could be, to integrate it into pywikibot, given the interest of IA for wikisource projects and possible automatic alignment of IA-Common-Wikidata-Wikisource metadata.
Comment 5 Alessandro Brollo 2014-03-05 08:17:58 UTC
I see that the bug is now assigned to marc Pelletier: thanks for attention! :-)
Comment 6 MZMcBride 2014-03-05 08:36:13 UTC
virtualenv --no-site-packages env
echo "source $HOME/env/bin/activate" >> .bashrc
source $HOME/env/bin/activate
pip install internetarchive

----

This will work, if you're interested in using virtualenv.
Comment 7 Alessandro Brollo 2014-03-05 09:39:37 UTC
I furiusly browsed python doc to see what virtualenv is; it doesn't seems something so alarming, I'll try. Thanks MZMcBride.
Comment 8 Alessandro Brollo 2014-03-05 19:06:36 UTC
@MZMcBride: Great: env, pip, internetarchive, OpalLib.py running! Thanks again.
Comment 10 Marc A. Pelletier 2014-03-25 17:59:09 UTC
Re-prioritizing since this only needs documentation.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links