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.
Related
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.
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.
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.
I am setting up os X 10.7.
I am using the default install of Python:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
I use a Python based package manager called easy_install.
Easy_install seems to not be able to find the compiler.
EDIT: When I tried to install MySQL-python I got this error:
$ sudo easy_install MySQL-python
Password:
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-python-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 /tmp/easy_install-P9H9WX/MySQL-python-1.2.3/egg-dist-tmp-rRTfZL
warning: no files found matching 'MANIFEST'
warning: no files found matching 'ChangeLog'
warning: no files found matching 'GPL'
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
error: Setup script exited with error: command 'llvm-gcc-4.2' failed with exit status 1
Xcode 4.1 used GCC, but with Xcode 4.2 that seems to have changed.
What compiler does Apple want us to use?
How do I setup the configuration so I can compile OSS?
I had the exact same problem when I upgraded from OSX 10.6 to 10.7. If you upgrade to 10.7 from 10.6, your version of Python may go from 2.6 to 2.7 and a result you may need to re-install most of your python packages.
Here's what worked for me:
Install the latest version of XCode from the App Store
Inside XCode, go to Preferences -> Downloads -> Components
download the Command Line Tools
That's all you need to do. Try to install again in a new shell. The command line tool installation will put llvm-gcc-4.2 into /usr/bin which should be in your default path. The installation also takes care of library paths and stuff that you don't really want to know about unless something breaks.
10.9 edit
If you're running 10.9 or higher, I think you might be able to run this from the command line instead to install the command line tools:
xcode-select --install
I haven't verified that this is an actual fix to the problem.
Alternative to installing Xcode, install GCC and related tools via:
https://github.com/kennethreitz/osx-gcc-installer
Sounds to me you ran into this issue. The thread shows a variety of solutions.
Hope that helps.
The fix is quite simple. Check out the following blogpost.
http://waqasshabbir.tumblr.com/post/19073648382/llvm-gcc-4-2-exe-error-on-mac-osx-lion-when-building
Using OS X 10.7.5 (Lion)
I tried the XCode solution, but my gevent pip installation still wasn't successful. Then, I tried building libevent from source but still no success with gevent installation. However, after I did
brew install libevent
I was able to successfully install gevent with
sudo pip install gevent
(Note: greenlet is also a dependency for gevent, so you may try installing it with pip as well. It was already installed on my machine.)
All of the suggestions here (Xcode command line options, and Kenneth Reitz' stuff) didn't work for me (I am on Mac OS X 10.7.5, Xcode 4.6.3).
What helped in the end was altering the cflags options in the mysql_config file (There were errors about 'unreconized command line options' while trying to 'sudo pip install MySQL-python').
See this post: cc1: error: unrecognized command line option "-Wno-null-conversion" within installing python-mysql on mac 10.7.5
I'm trying to install PyCrypto on an Ubuntu instance via Buildout (via easy_install) and I'm getting the following error:
Getting distribution for 'pycrypto>=1.9'.
Running easy_install:
/usr/bin/python "-S" "-c" "import sys,os;p = sys.path[:];import site;sys.path[:] = p; [sys.modules.pop(k) for k, v in sys.modules.items() if hasattr(v, '__path__') and len(v.__path__)==1 and not os.path.exists(os.path.join(v.__path__[0],'__init__.py'))];from setuptools.command.easy_install import main;main()" "-mUNxd" "/opt/rocktech/buildout/cache/eggs/tmppKIfK7" "-Z" "/opt/rocktech/buildout/cache/download/dist/pycrypto-2.4.tar.gz"
path=/opt/rocktech/buildout/cache/eggs/setuptools-0.6c12dev_r88846-py2.6.egg
Processing pycrypto-2.4.tar.gz
Running pycrypto-2.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-dD_8Pu/pycrypto- 2.4/egg-dist-tmp-_d3xDl
error: Setup script exited with error: src/config.h: No such file or directory
An error occurred when trying to install pycrypto 2.4. Look above this message for any errors that were output by easy_install.
While:
Installing django.
Getting distribution for 'pycrypto>=1.9'.
Error: Couldn't install: pycrypto 2.4
Any idea on what's causing this?
Notably, I had the same issue locally on Snow Leopard and I was able to fix it by downloading the code directly and running python manage.py build and python manage.py install by hand. I want to avoid that here because I'm deploying to a dozen servers.
Even with the newest pycrypto I keep having this problem, so I just run ./configure and the src/config.h is created, so now just run pip or, easy_install or, setup.py...
You can also download pycrypto-2.4.tar.gz unpack it and run (as root):
./configure
python setup.py install
After that pycrypto will be installed into /usr/lib/python2.7/site-packages/Crypto. I tested it on 'easy_install pysnmp'.
It appears this is an open issue. The workaround is to use pip instead or stick to PyCrypto 2.3. https://bugs.launchpad.net/pycrypto/+bug/881130
EDIT: This bug was fixed in PyCrypto 2.4.1.
Just as an update, PyCrypto has since resolved this issue as you can see from the ticket being marked "Fix Resolved": https://bugs.launchpad.net/pycrypto/+bug/881130. Just an FYI, in case someone comes across this later. This "should" be a non-issue now.