Search code examples
pythonmoduleinstallationpythonanywhere

Failed to install a custom python module in pythonanywhere


So I'm new in pythoneverywhere. I was trying to install a custom python module (dryscrape) for myself but failed. I did not load it into my file system in pythonanywhere. I use python 2.6 So, what's wrong/missing:

 ~ $ pip2.6 install --igorsavinkin dryscrape                                   

Usage:   
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --igorsavinkin
~ $ pip2.6 install dryscrape                                                  
Collecting dryscrape
  Could not find any downloads that satisfy the requirement dryscrape
  No distributions at all found for dryscrape

tryed to include it from github but failed too

~ $ pip2.6 install https://github.com/niklasb/dryscrape
Collecting https://github.com/niklasb/dryscrape
  Downloading https://github.com/niklasb/dryscrape
     | 45kB 14.1MB/s
  Cannot unpack file /tmp/pip-53bAWe-unpack/dryscrape (downloaded from /tmp/pip-4KCbIJ-build, 
content-type: text/html; charset=utf-8); cannot detect archive format
  Cannot determine archive format of /tmp/pip-4KCbIJ-build

Should i download it to file system first?


Solution

  • Note that dryscrape is written for Python 2.7+ I successfully installed dryscrape in pythonanywhere:

    git clone https://github.com/niklasb/dryscrape.git dryscrape
    cd dryscrape
    #try this in virtualenv
    
    virtualenv env
    source env/bin/activate
    
    pip install -r requirements.txt
    

    Then install dryscrape

    python setup.py install
    

    From doc http://dryscrape.readthedocs.org/en/latest/installation.html