I am already install the python2.7 in my machine. Then i tried to install scrapy by using following commands but its throwing some exceptions.
[email protected][elcot]#pip install scrapy
Requirement already satisfied (use --upgrade to upgrade): scrapy in /usr/local/lib/python2.7/site-packages/Scrapy-0.22.0-py2.7.egg
Downloading/unpacking Twisted>=10.0.0 (from scrapy)
Downloading Twisted-13.2.0.tar.bz2 (2.7MB): 2.7MB downloaded
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 274, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/local/lib/python2.7/site-packages/pip/req.py", line 1173, in prepare_files
self.unpack_url(url, location, self.is_download)
File "/usr/local/lib/python2.7/site-packages/pip/req.py", line 1320, in unpack_url
retval = unpack_http_url(link, location, self.download_cache, self.download_dir, self.session)
File "/usr/local/lib/python2.7/site-packages/pip/download.py", line 587, in unpack_http_url
unpack_file(temp_location, location, content_type, link)
File "/usr/local/lib/python2.7/site-packages/pip/util.py", line 625, in unpack_file
File "/usr/local/lib/python2.7/site-packages/pip/util.py", line 543, in untar_file
tar = tarfile.open(filename, mode)
File "/usr/local/lib/python2.7/tarfile.py", line 1678, in open
return func(name, filemode, fileobj, **kwargs)
File "/usr/local/lib/python2.7/tarfile.py", line 1744, in bz2open
raise CompressionError("bz2 module is not available")
CompressionError: bz2 module is not available
Storing debug log for failure in /root/.pip/pip.log
How to solve this.......
Perhaps you need to install
pip in your
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py python2.7 get-pip.py
If you end up with multiple
pip commands, you can call the one from
python2.7 like this
python2.7 -m pip install scrapy
Try to install by easy install.
This will be helpful for you.
Try creating a symlink
ln -s /usr/local/bin/python2.7 /usr/bin/python.