Search code examples
djangoshopifywebfaction

webfaction hosted django app, shopify module will not import


I've recently created a site with a django app hosted by webfaction. In general, things are running as expected, but I am also trying to use the ShopifyAPI, and get "Import error, no module named shopify" traced to one of my views.py. Everything worked when developing on localhost.

I SSHed into the host server and tried to install the ShopifyAPI with easy_install. It seemed to have reported being successfully installed, but I'm not sure if this actually does anything real on an external server?

Does anybody have suggestions? Any limitations on ShopifyAPI that I may not have considered?

Thanks!


Solution

  • The easy_install command will install the module for Python2.4. You are likely using Python2.6 or Python2.7. If you are using Python2.6, enter:

    easy_install-2.6 ShopifyAPI instead of easy_install ShopifyAPI.

    If you are using Python2.7, enter:

    easy_install-2.7 ShopifyAPI insead of easy_install ShopifyAPI.

    You can read more about using easy_install on Webfaction here

    After installing the API, restart your Apache instance and it should see the module as expected.