ubuntu with both Python 2.7 and 3.4

52 views
Skip to first unread message

Malik Rumi

unread,
May 26, 2015, 3:26:44 PM5/26/15
to scrapy...@googlegroups.com
1. I used the ubuntu package to install and all seems to have gone well with that. However, when I follow the tutorial to run scrapy startproject tutorial, I got /usr/local/bin/scrapy no such file or directory. Then I ran /usr/bin/scrapy and it was fine. So for the time being I have to run that everywhere I should be able to just run 'scrapy'. I can live with this, but if there is a way to get this to install to the 'right' place and save me a few keystrokes without messing things up, i'd like to know about them.

2. When calling scrapy shell, the tutorial docs say it should open in ipython. I do have ipython, but it is attached to Python 3.4. When I ran /usr/bin/scrapy shell, I got a regular interpreter. Since the rest of scrapy seems to be working ok, I assumed the dependencies resolved by the ubuntu packages included binding it to 2.7. If so, what is the best way to access ipython through the scrapy shell, again, without messing up anything working i have already?

3. I was surprised that there was no reference to using a virtualenv in the docs. Do people not use scrapy that way?

thanks

Travis Leleu

unread,
May 26, 2015, 5:21:57 PM5/26/15
to scrapy-users
I'd recommend installing using pip, instead of the ubuntu packages.
That works better with a virtual environment. To run scrapy in a
venv, just setup the venv and install scrapy, ipython, and all
dependencies. This should solve all your questions.
> --
> You received this message because you are subscribed to the Google Groups
> "scrapy-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to scrapy-users...@googlegroups.com.
> To post to this group, send email to scrapy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/scrapy-users.
> For more options, visit https://groups.google.com/d/optout.

Malik Rumi

unread,
May 26, 2015, 6:25:23 PM5/26/15
to scrapy...@googlegroups.com, m...@travisleleu.com
Thanks. Travis. Is there a requirements.txt somewhere, or should I just put one together based on the terminal output from installing ubuntu packages? Pip does not automatically install dependencies, for some reason...

Capi Etheriel

unread,
May 28, 2015, 12:08:04 AM5/28/15
to scrapy...@googlegroups.com, m...@travisleleu.com
turns out pip *does* install dependencies, maybe your pip is outdated.
within your virtualenv you can start with a `pip install --upgrade pip`
from there, you can install scrapy.

Malik Rumi

unread,
May 28, 2015, 6:12:50 PM5/28/15
to scrapy...@googlegroups.com
pip is up to date. Maybe it was because I installed it to 3.4?

--
You received this message because you are subscribed to a topic in the Google Groups "scrapy-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scrapy-users/3eHMNrBS4sw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scrapy-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages