Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 499
Anuvrat Parashar Avatar asked Oct 06 '22 09:10

Anuvrat Parashar


1 Answers

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
like image 115
Bernardo Botella Avatar answered Oct 10 '22 02:10

Bernardo Botella