Anuvrat Parashar
Anuvrat Parashar

Reputation: 3110

How can we configure scrapyd to use a virtualenv for a project?

I am trying to configure a scrapyd to run on Ubuntu Server 12.04 machine. I am not able to deploy my projects to it because it can't find some libraries. I can install all the dependencies in the main or default python environment (the one maintained by the os) but I wouldn't want to do that.

Is there a way for scrapyd to be configured to use a python virtualenv? If yes, How? If no, why?

Upvotes: 5

Views: 1102

Answers (1)

Bernardo Botella
Bernardo Botella

Reputation: 193

I managed to install scrapyd using virtualenv on an Ubuntu Server. To install virtualenv, just type:

virtualenv environment_name

Then, you must activate the environment with:

source [PATH_TO_YOUR_ENVIRONMENT]/bin/activate

After that, you just have to install scrapyd:

pip install scrapyd

If any dependency is missing, just grab its name and install it with the same command:

pip install [DEPENDENCY_NAME]

After that, you should be able to run scrapyd with its command:

scrapyd

Upvotes: 4

Related Questions