0

I'm trying to use the spoonacular python API found here https://github.com/ddsky/spoonacular-api-clients/tree/master/python

However, I can't seem to figure out how to install it in a virtualenv. I'm used to installing packages using pip. So when the instructions say to install like this:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

do I need to save this directory (https://github.com/ddsky/spoonacular-api-clients/tree/master/python) to my own GitHub repo?

Any help would be greatly appreciated!

Linda Paiste
  • 38,446
  • 6
  • 64
  • 102
  • 1
    what is a´happening if you try it with pip ? Any erros ? – SebNik May 03 '20 at 13:28
  • First you have to activate your virtual environment . Which OS are you using. ? – dejanualex May 03 '20 at 13:29
  • Hi @SebNik , there is a PyPi spoonacular package `pip install spoonacular` But this is not the official repo. It pulls from https://github.com/johnwmillr/SpoonacularAPI . I want to install the official repo as it appears there are new api calls in the official repo. – calgarycoder May 03 '20 at 13:34
  • Hi @dejdej , I'm using MacOS and I've activated a virtualenv. In my case, I use `source venv/bin/activate` – calgarycoder May 03 '20 at 13:36
  • okay then try `pip install git+https://github.com/ddsky/spoonacular-api-clients.git` – SebNik May 03 '20 at 13:40
  • Hi @SebNik , when I try that I get: `/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/tokenize.py", line 447, in open buffer = _builtin_open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/4r/9rt6hh115cxg8hbn52xp3sr80000gn/T/pip-req-build-03ekl9jz/setup.py' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/4r/9rt6hh115cxg8hbn52xp3sr80000gn/T/pip-req-build-03ekl9jz/` – calgarycoder May 03 '20 at 13:45

1 Answers1

0

You're right something is strange, I tried a more direct approach:

  1. First activate your virtual environment
  2. Clone repo : git clone https://github.com/ddsky/spoonacular-api-clients.git
  3. Install the package manually:

$ cd spoonacular-api-clients/python

$ python setup.py install

It should work: enter image description here

dejanualex
  • 3,872
  • 6
  • 22
  • 37