Reputation: 3
I need to use the Graph API to pull some data from Facebook and I'm using Conda for my package management. However, when I try to install it from Conda it gives me an error message saying:
PackagesNotFoundError: The following packages are not available from the current channels:
- facebook-sdk
Searching on Google sent me to a Conda package which I used but the version of the API on that is very old and the link is from 2011.
Can someone tell me how to install the latest version of the Graph API using Conda? I'm able to get it to install from PyPI install just fine.
Upvotes: 0
Views: 897
Reputation: 76700
There really isn't a reliable Anaconda Cloud channel to get the Facebook SDK for Python (which itself is a third-party open-source project). Instead, just follow the recommended installation from the package documentation, but make sure to activate your environment first. Also, install the prerequisites (looks like it only needs requests
) through Conda first.
conda activate myenv
conda install requests
pip install -e git+https://github.com/mobolic/facebook-sdk.git#egg=facebook-sdk
Just be aware that, even though it is supported, installing things from PyPI into a Conda env can be lead to an unstable env (see "Using Pip in a Conda Environment"). I'd highly encourage you to create a separate env for this project (e.g., conda create -n fbenv python=3.7 requests
).
Upvotes: 1