pycurl installs fine on python2.6 but i get the following error when I try to install in on 2.7 via easy_install on maverick
$ sudo easy_install pycurl
install_dir /usr/local/lib/python2.7/dist-packages/
Searching for pycurl
Reading http://pypi.python.org/simple/pycurl/
Reading http://pycurl.sourceforge.net/
Reading http://pycurl.sourceforge.net/download/
Best match: pycurl 7.19.0
Downloading http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz
Processing pycurl-7.19.0.tar.gz
Running pycurl-7.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-PFzxzf/pycurl-7.19.0/egg-dist-tmp-oAFjdV
Using curl-config (libcurl 7.21.0)
src/pycurl.c:42: fatal error: Python.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
Is 2.7 not compatible with pycurl?
sudo apt-get install python-dev
This installs the Python development package that is required and fixes the problem of the missing header file.
(Please read the comment by Corey)
Related
I am running the command pip3 install psutil, but running into the following error:
me$ pip3 install psutil
Collecting psutil
Using cached https://files.pythonhosted.org/packages/51/9e/0f8f5423ce28c9109807024f7bdde776ed0b1161de20b408875de7e030c3/psutil-5.4.6.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/psutil.egg-info
writing pip-egg-info/psutil.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/psutil.egg-info/dependency_links.txt
writing top-level names to pip-egg-info/psutil.egg-info/top_level.txt
writing manifest file 'pip-egg-info/psutil.egg-info/SOURCES.txt'
error: [Errno 2] No such file or directory: '': ''
abort: no repository found in '/private/var/folders/n2/2rxj0k0d3bb73gbfstgcgzs40000gp/T/pip-install-y27z_s2w/psutil' (.hg not found)!
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/n2/2rxj0k0d3bb73gbfstgcgzs40000gp/T/pip-install-y27z_s2w/psutil/
I've tried everything and cannot find a solution - it works fine using pip install psutil.
This isn't the only package that this error is occurring on.
Any help would be appreciated!
Thanks!
Uninstalled both 2.7 and 3, and uninstalled mercurial then brew install-ed both python#2 and python#3.
I am trying to install pycurl on OS X Mavericks. I have downloaded and installed the Xcode dev tools to have some compiler. I went into the Xcode preferences and made sure that I have downloaded all the compliers I would need but still getting this error
When I try to install pycurl I get the following errors. Any help would be much appreciated.
local-mbp:~ $ sudo easy_install pycurl
Password:
Searching for pycurl
Reading http://pypi.python.org/simple/pycurl/
Best match: pycurl 7.19.3.1
Downloading https://pypi.python.org/packages/source/p/pycurl/pycurl-7.19.3.1.tar.gz#md5=6df8fa7fe8b680d93248da1f8d4fcd12
Processing pycurl-7.19.3.1.tar.gz
Running pycurl-7.19.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-jKMmtE/pycurl-7.19.3.1/egg-dist-tmp-9z89Ns
Using curl-config (libcurl 7.30.0)
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: Setup script exited with error: command 'cc' failed with exit status 1
local-mbp:~ $ which gcc
/usr/bin/gcc
local-mbp:~$ which cc
/usr/bin/cc
local-mbp:~$
Try this:
brew install python
Double check you are using brewed Python:
which python
(Should return something like /usr/local/bin/python)
Install pycurl with pip.
pip install pycurl
I just tested this on Mavericks.
Try specify the ARCHFLAGS env var:
ARCHFLAGS="-arch x86_64" pip install pycurl
In my dev environment, due to some networking problems, when I run:
(my-virt-env)$ pip install lxml
It always fails due to:
Downloading/unpacking lxml
Downloading lxml-3.1.2.tar.gz (3.3Mb): 1.2Mb downloaded
Exception:
Traceback (most recent call last):
blablabla
error: [Errno 104] Connection reset by peer
Then I downloaded lxml-3.1.2.tar.gz from somewhere else and used an usb key to copy it over. Is there anyway I can tell pip not bother to go to the Internet for this package, just install it via the local tar.gz? So I can do something like:
(my-virt-env)$ pip install ${local_path}/lxml*.tar.gz
tried this command, I get very long error message:
pip install /home/shengjie/Downloads/lxml-3.1.2.tar.gz
Unpacking /home/shengjie/Downloads/lxml-3.1.2.tar.gz
Running setup.py egg_info for package from file:///home/shengjie/Downloads/lxml-3.1.2.tar.gz
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.1.2.
Building without Cython.
ERROR: /bin/sh: 1: xslt-config: not found
** make sure the development packages of libxml2 and libxslt are installed **
......................
bla bla bla
......................
/tmp/pip-Vg13dM-build/src/lxml/includes/etree_defs.h:9:31: fatal error: libxml/xmlversion.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
I am running Ubuntu, I know you can run `apt-get install python-lxml` and get it installed on your box. But that doesn't work for my case as I want install it in my virtual env: `my-virt-env`.
You can do it, the command is:
pip install --no-index --find-links=file:///[absolute path to your tar.gz]
What I'm seeing is that it's complaining that the DEV version of libxml2 and libxslt are missing.
Do an apt-get installation of those 2 packages, libxml2-dev and libxslt-dev, and perform your pip installation again and see how that goes.
I am trying to install adns-python using linux and had to recompile adns with some special options, so I can't seem to use easy_install <tarball> as I normally would
(py26_default)[mpenning#localhost src]$ easy_install adns-python-1.2.1.tar.gz
Processing adns-python-1.2.1.tar.gz
Running adns-python-1.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-9cVl4i/adns-python-1.2.1/egg-dist-tmp-vvO8Ms
adnsmodule.c:10:18: error: adns.h: No such file or directory
adnsmodule.c:31: error: expected specifier-qualifier-list before âadns_stateâ
adns.h is installed under /opt/adns/include/adns.h; how can I make easy_install install with a local installation of adns?
EDIT
After the attempt below, I still find an ld error, even though I exported LD_LIBRARY_PATH...
(py26_default)[mpenning#localhost src]$ ls /opt/adns/lib/
libadns.a libadns.so libadns.so.1 libadns.so.1.2
(py26_default)[mpenning#localhost src]$ export LD_LIBRARY_PATH=/opt/adns/lib
(py26_default)[mpenning#localhost src]$ C_INCLUDE_PATH=/opt/adns/include easy_install ./adns-python-1.2.1.tar.gz
Processing adns-python-1.2.1.tar.gz
Running adns-python-1.2.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-x68T9f/adns-python-1.2.1/egg-dist-tmp-MpCzMP
/usr/bin/ld: cannot find -ladns
collect2: ld returned 1 exit status
error: Setup script exited with error: command 'gcc' failed with exit status 1
(py26_default)[mpenning#localhost src]$
LD_LIBRARY_PATH is used to find a shared library at runtime (when an executable is run), not during linking.
To build the extension, unpack the tarball and run:
python setup.py build_ext -I/opt/adns/include -L/opt/adns/lib -R/opt/adns/lib
To install:
python setup.py install
You could specify build_ext options in setup.cfg:
[build_ext]
include_dirs=/opt/adns/include
library_dirs=/opt/adns/lib
rpath=/opt/adns/lib
in this case you could run easy_install directly.
Please try like this
INCLUDE_PATH=/opt/adns/include easy_install adns-python-1.2.1.tar.gz
if it is not working please try with CPLUS_INCLUDE_PATH or C_INCLUDE_PATH
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.