al-serebrov / scrapinghub-elasticsearch-loader

Load items from Scrapinghub to ElasticSearch
GNU General Public License v3.0
11 stars 0 forks source link

Dependencies are not installed through setup.py #7

Closed al-serebrov closed 4 years ago

al-serebrov commented 4 years ago

If the package is installed though setup.py:

➜ pip install .
Processing /home/alex/web/sh-es-loader
Building wheels for collected packages: shes
  Building wheel for shes (setup.py) ... done
  Created wheel for shes: filename=shes-0.5-cp36-none-any.whl size=16746 sha256=2974729c15a020bd3885db7712b69f1eb7983ef9403d435e95b73264c959e8fa
  Stored in directory: /home/alex/.cache/pip/wheels/09/3c/53/0f75f4671470b1e6202e29fc617af498eda6ee8fd8bb0cd053
Successfully built shes
Installing collected packages: shes
Successfully installed shes-0.5

And then run:

➜ python shes.py -j $JOB_ID
Traceback (most recent call last):
  File "shes.py", line 18, in <module>
    from docopt import docopt
ModuleNotFoundError: No module named 'docopt'

We can see that the dependencies are not installed, a hotfix (for now) is to manually install them:

➜ pip install -r requirements.txt

Updated README.md accordingly in https://github.com/al-serebrov/scrapinghub-elasticsearch-loader/commit/3628423130c501e6858cdc924e753540f59fa259 But we need to figure out why they are not installed with the package and fix this.

If I add a workaround for installing dependencies from requirements.txt file as suggested here, tox starts failing because it's unable to locate requirements.txt file.

al-serebrov commented 4 years ago

https://caremad.io/posts/2013/07/setup-vs-requirement/

serebrov commented 4 years ago

@al-serebrov just a guess: you have a typo here "instal_requires" in setup.py

s/instal/install