Having trouble in installing Scrapy in Windows - python

I was install Scrapy using in Windows (64 bit).
And I got stuck when its shows error in finding vcvarsall.bat:
Installed c:\python27\lib\site-packages\w3lib-1.10.0-py2.7.egg
Searching for cryptography>=0.2.1
Reading https://pypi.python.org/simple/cryptography/
Best match: cryptography 0.5.4
Downloading https://pypi.python.org/packages/source/c/cryptography/cryptography-
0.5.4.tar.gz#md5=4fd1f10e9f99009a44667fabe7980aec
Processing cryptography-0.5.4.tar.gz
Writing c:\users\acer\appdata\local\temp\easy_install-v0yx5l\cryptography-0.5.4\
setup.cfg
Running cryptography-0.5.4\setup.py -q bdist_egg --dist-dir c:\users\acer\appdat
a\local\temp\easy_install-v0yx5l\cryptography-0.5.4\egg-dist-tmp-tfxf5w
Searching for cffi>=0.8
Reading https://pypi.python.org/simple/cffi/
Best match: cffi 0.8.6
Downloading https://pypi.python.org/packages/source/c/cffi/cffi-0.8.6.tar.gz#md5
=474b5a68299a6f05009171de1dc91be6
Processing cffi-0.8.6.tar.gz
Writing c:\users\acer\appdata\local\temp\easy_install-v0yx5l\cryptography-0.5.4\
temp\easy_install-x3fgjg\cffi-0.8.6\setup.cfg
Running cffi-0.8.6\setup.py -q bdist_egg --dist-dir c:\users\acer\appdata\local\
temp\easy_install-v0yx5l\cryptography-0.5.4\temp\easy_install-x3fgjg\cffi-0.8.6\
egg-dist-tmp-dtqwwf
error: Setup script exited with error: Unable to find vcvarsall.bat

Another way to get around the missing vcvarsall.bat is to install the Microsoft Visual C++ compiler for Python 2.7 http://www.microsoft.com/en-us/download/details.aspx?id=44266
when you get that error you might want to just find a Windows installer for it, it will include the missing file.
http://www.secdev.org/projects/scapy/files/
here's an explanation of the error.
http://slacy.com/blog/2010/09/python-unable-to-find-vcvarsall-bat/
Previous question here

Try:
easy_install scrapy
This works for me without any error.

Related

pip install M2Crypto failing

While installing M2Crypto on Fedora 21 i am getting the following error:
Installed /home/subho/.virtualenvs/shumgrepper/lib/python2.7/site-packages/shumgrepper-0.0.1-py2.7.egg
Processing dependencies for shumgrepper==0.0.1
Searching for M2Crypto
Reading https://pypi.python.org/simple/M2Crypto/
Best match: M2Crypto 0.22.3
Downloading https://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-0.22.3.tar.gz#md5=573f21aaac7d5c9549798e72ffcefedd
Processing M2Crypto-0.22.3.tar.gz
Writing /tmp/easy_install-q3YUXp/M2Crypto-0.22.3/setup.cfg
Running M2Crypto-0.22.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-q3YUXp/M2Crypto-0.22.3/egg-dist-tmp-nxDfs1
SWIG/_ssl.i:676: Error: Syntax error in input(1).
error: Setup script exited with error: command 'swig' failed with exit status 1
Tried following the steps in here,here. But the latest version of pip cleans out the unfinished build. Also i tried downloading M2Crypto from pypi extracted it but couldn't find any fedora_setup.sh file.
Also, looking deeper into setup.py in M2Crypto , i find the following lines. So it seems like they have taken care of fedora OS so obviously no separate fedora_setup.sh file is there.
# Fedora does hat tricks.
if platform.linux_distribution()[0] in ['Fedora', 'CentOS']:
if platform.architecture()[0] == '64bit':
self.swig_opts.append('-D__x86_64__')
elif platform.architecture()[0] == '32bit':
self.swig_opts.append('-D__i386__')
self.include_dirs += [os.path.join(self.openssl, opensslIncludeDir),
os.path.join(os.getcwd(), 'SWIG')]
Any help would be great.
This is a swig version issue. Latest version of swig gives Syntax error. I switched to an older version (SWIG Version 3.0.2) to overcome this issue.

trying to install mercurial via easy_install

I am using Active Python 2.5.1, Mercurial 1.8.1 and TortoiseHg 1.1.0
on Windows XP (all x86)
I am trying to configure a mercurial repo in reviewboard. For that it
requires mercurial python module
So when i try to install mercurial via easy_install i get the
following error
C:\>easy_install mercurial==1.8.1
Searching for mercurial==1.8.1
Reading http://pypi.python.org/simple/mercurial/
Reading http://mercurial.selenic.com/
Reading http://www.selenic.com/mercurial
Reading http://mercurial.selenic.com/release/
Best match: mercurial 1.8.1
Downloading http://mercurial.selenic.com/release/mercurial-1.8.1.tar.gz
Processing mercurial-1.8.1.tar.gz
Running mercurial-1.8.1\setup.py -q bdist_egg --dist-dir c:
\docume~1\username\locals~1\temp\easy_install-7l0ykf
\mercurial-1.8.1\egg-dist-tmp-egcnt6
cc1.exe: error: unrecognized command line option '-mno-cygwin'
error: Setup script exited with error: command 'gcc' failed with exit
status 1
I have installed gcc through MinGW
Thanks shu zOMG chen, 1.8.1 is a requirement so can't really change that.The second link did help, but now there's another problem. After removing -mno-cygwin occurences from distutils\cygwinccompiler.py I ran easy_install mercurial==1.8.1. The trace is as folows :
C:\>easy_install mercurial==1.8.1
Searching for mercurial==1.8.1
Reading http://pypi.python.org/simple/mercurial/
Reading http://mercurial.selenic.com/
Reading http://www.selenic.com/mercurial
Reading http://mercurial.selenic.com/release/
Best match: mercurial 1.8.1
Downloading http://mercurial.selenic.com/release/mercurial-1.8.1.tar.gz
Processing mercurial-1.8.1.tar.gz
Running mercurial-1.8.1\setup.py -q bdist_egg --dist-dir c:\docume~1\username\locals~1\temp\easy_install-05el_6\mercurial-1.8.1\egg-dist-tmp-zsfye0
gcc: error: CreateProcess: No such file or directory
error: Setup script exited with error: command 'gcc' failed with exit status 1
C:\>
Please Help
Regards
From your output it appears that easy_install is trying to build mercurial with an option that requires some cygwin parts. If you're using mingw gcc you might want to look at https://www.mercurial-scm.org/wiki/BuildingOnWindows for instuctions on how to build in windows.
Is there a reason you're using 1.8.1? The latest version is 2.1.2.
Googling around, Compiling with cython and mingw produces gcc: error: unrecognized command line option '-mno-cygwin' might help you with this too.
There are also exe and msi installers for Windows at https://www.mercurial-scm.org/downloads.
In my opinion, the TortoiseXXX changes the mental picture of what is behind the wrapper. It was difficult for me to explain to my colleague how to work with CVS correctly when TortoiseCVS was used.
Off topic: For your own other purpose, try also Git instead (http://git-scm.com/) The idea is very similar. I guess the Git is going to win statistically.
The msysgit (Windows) is nice, the functionality is comparable with the original Linux one, the included Git Gui and gitk may have rather strange look (Tcl/Tk), but they are very good for the basic Git operations.

Installing shoutpy / Boost.python on windows

I have tried to install ShoutPY (http://dingoskidneys.com/shoutpy/) under python 2.7 x86 on windows but install fails with:
C:\Python27\Scripts>easy_install shoutpy
Searching for shoutpy
Reading http://pypi.python.org/simple/shoutpy/
Reading http://dingoskidneys.com/shoutpy/
Best match: shoutpy 1.0.0
Downloading http://dingoskidneys.com/shoutpy/shoutpy-1.0.0.tar.gz
Processing shoutpy-1.0.0.tar.gz
Writing c:\users\vladim~1\appdata\local\temp\easy_install-pnwegl\shoutpy-1.0.0\s
etup.cfg
Running shoutpy-1.0.0\setup.py -q bdist_egg --dist-dir c:\users\vladim~1\appdata
\local\temp\easy_install-pnwegl\shoutpy-1.0.0\egg-dist-tmp-otdtxq
shoutpy.cc:26:28: fatal error: boost/python.hpp: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
What I figured out is that I am missing Boost.python. Tried to find how to install it but failed, could anyone help me out?
thanks.
I'm guessing you're not running this under Cygwin, so you have a couple challenges. Did you install gcc? It's required by your install. You'll also need Boost installed and as Bart said in the comments, the best thing to do is to check out their build/install documentation.

error: installing appscript

i am having some trouble getting appscript downloaded for python 2.7. when i try to run the easy install im geting a No such file or directory error. Anyone have anyideas on what im doing wrong?
$ sudo easy_install appscript
Searching for appscript
Reading http://pypi.python.org/simple/appscript/
Reading http://appscript.sourceforge.net
Best match: appscript 1.0.0
Downloading http://pypi.python.org/packages/source/a/appscript/appscript- 1.0.0.tar.gz#md5=6619b637037ea0f391f45870c13ae38a
Processing appscript-1.0.0.tar.gz
Running appscript-1.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-eJivX3 /appscript-1.0.0/egg-dist-tmp-BYJoe1
unable to execute llvm-gcc-4.2: No such file or directory
error: Setup script exited with error: command 'llvm-gcc-4.2' failed with exit status 1
It looks like you are missing the needed compiler.
"llvm-gcc-4.2"
Try installing it or specifying it's path if it is already installed.

MySql Python Adapter Installation Problem on Windows 7 Machine

C:\Users\Me>easy_install MySQL-python
Searching for MySQL-python
Reading [http://pypi.python.org/simple/MySQL-python/
Reading [http://sourceforge.net/projects/mysql-python/
Reading [http://sourceforge.net/projects/mysql-python
Best match: MySQL-python 1.2.3
Downloading [http://download.sourceforge.net/sourceforge/mysql-python/MySQL-pytho
n-1.2.3.tar.gz
Processing MySQL-python-1.2.3.tar.gz
Running MySQL-python-1.2.3\setup.py -q bdist_egg --dist-dir c:\users\Me\appdata
\local\temp\easy_install-ag_30a\MySQL-python-1.2.3\egg-dist-tmp-mbyihd
error: The system cannot find the file specified
Why is it looking there? (c:\users\Me\appdata
\local\temp\easy_install-ag_30a\MySQL-python-1.2.3\egg-dist-tmp-mbyihd)
Note: I added '[' before all http tags because new users can't place more than two links.
How do I resolve this?
You can download the binaries from here, http://www.codegood.com/archives/129, which will bypass easy_install all together. Plus, stop using easy_install, use pip, it's much better.

Categories