I am trying to install Crossbar in my ubuntu 14.04. I installed the
dependencies as per the instruction here. When I am trying to
install cross the twisted installation fails. I am having python
2.7.6. I installed all the python-devl packages and all are up to date. I am getting the below error when I execute "pip install
crossbar".
copying twisted/internet/iocpreactor/iocpsupport/winsock_pointers.c -> build/lib.linux-i686-2.7/twisted/internet/iocpreactor/iocpsupport
copying twisted/python/sendmsg.c -> build/lib.linux-i686-2.7/twisted/python
copying twisted/test/raiser.c -> build/lib.linux-i686-2.7/twisted/test
running build_ext
cc -O2 -fPIC -Wimplicit -I/usr/lib/pypy/include -c conftest.c -o conftest.o
building 'twisted.runner.portmap' extension
creating build/temp.linux-i686-2.7
creating build/temp.linux-i686-2.7/twisted
creating build/temp.linux-i686-2.7/twisted/runner
cc -O2 -fPIC -Wimplicit -I/usr/lib/pypy/include -c twisted/runner/portmap.c -o build/temp.linux-i686-2.7/twisted/runner/portmap.o
twisted/runner/portmap.c:10:20: fatal error: Python.h: No such file or directory
include <Python.h>
compilation terminated.error: command 'cc' failed with exit status 1
Do you have the dev files installed from pypy? I don't use Ubuntu, but I believe the package is called pypy-dev. I contains a proper Python.h.
The one you mention belongs to the main Python installation. /usr/include/python2.7/Python.h
Related
In Windows 10, I installed the linux subsystem.
In cmd, I run bash.
In bash,
I found that my current Python is 2.7.6.
I want to install the regex python library. But there is error in the following, and does someone know the solution?.
Thanks.
$ sudo python get-pip.py
sudo: unable to resolve host TINGL-ND1
The directory '/home/t/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been\
disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H\
flag.
The directory '/home/t/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been\
disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
/tmp/tmp6uv5w8/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has \
been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the\
server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer versio\
n of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingw\
arning.
/tmp/tmp6uv5w8/pip.zip/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLConte\
xt object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connecti\
ons to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.read\
thedocs.io/en/latest/security.html#insecureplatformwarning.
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages
$ sudo -H pip install regex
sudo: unable to resolve host Ocean1
Collecting regex
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HT\
TPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. Th\
is may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade t\
o a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.\
html#snimissingwarning.
SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning:\
A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause cert\
ain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see http\
s://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached regex-2017.01.17.tar.gz
Building wheels for collected packages: regex
Running setup.py bdist_wheel for regex ... ^[[?25lerror
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-qc8Myq/regex\
/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,\
__file__, 'exec'))" bdist_wheel -d /tmp/tmpIm5vbcpip-wheel- --python-tag cp27:
/usr/local/lib/python2.7/dist-packages/setuptools/dist.py:333: UserWarning: Normalizing '2017.01.17' to '2017.1.17'
normalized_version,
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying Python2/regex.py -> build/lib.linux-x86_64-2.7
copying Python2/_regex_core.py -> build/lib.linux-x86_64-2.7
copying Python2/test_regex.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_regex' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Python2
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/inc\
lude/python2.7 -c Python2/_regex.c -o build/temp.linux-x86_64-2.7/Python2/_regex.o
Python2/_regex.c:46:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for regex
^[[?25h Running setup.py clean for regex
Failed to build regex
Installing collected packages: regex
Running setup.py install for regex ... ^[[?25lerror
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-qc8Myq/reg\
ex/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(cod\
e, __file__, 'exec'))" install --record /tmp/pip-oM77xP-record/install-record.txt --single-version-externally-managed -\
-compile:
/usr/local/lib/python2.7/dist-packages/setuptools/dist.py:333: UserWarning: Normalizing '2017.01.17' to '2017.1.17'
normalized_version,
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying Python2/regex.py -> build/lib.linux-x86_64-2.7
copying Python2/_regex_core.py -> build/lib.linux-x86_64-2.7
copying Python2/test_regex.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_regex' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Python2
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/i\
nclude/python2.7 -c Python2/_regex.c -o build/temp.linux-x86_64-2.7/Python2/_regex.o
Python2/_regex.c:46:20: fatal error: Python.h: No such file or directory
This error message indicates that you are missing the Python development libraries.
Python2/_regex.c:46:20: fatal error: Python.h: No such file or directory
You can install them using the following command.
Windows Subsystem for Linux / Debian / Ubuntu
sudo apt-get install python-dev
Fedora / RedHat / CentOS
sudo yum install python-devel
You need to install the python-dev package, which includes Python.h.
There is a much simpler solution, though - install Python for Windows, without using the Linux Subsystem. Starting with Python 3.5 pip sometimes (actually, quite often) installs the precompiled binary version, saving you a lot of trouble.
In fact, since Python 3.5, it's easier to install most packages on Windows than it is on Linux.
It's because of you didn't have python-dev or python3-dev packages due to your python version.
Just install them through 'pip' or 'pip3' package installer and enjoy it!
Note if you find the mentioned packages is installed and your problem is still exist!, you must look for 'Python.h' file in your file system by:
sudo find / -name "Python.h"
and then add listed paths which includes Python.h into your C_INCLUDE_PATH environment variable something like:
export C_INCLUDE_PATH=/usr/include/python3.6m/
and now retry your installation and enjoy!
re (the regular expression package) comes with the regular python installation
re
I am trying to install the python package biopython from source on my Macbook pro OSX 10.9.4,
I run python setup.py build in the terminal and receive this
running build
running build_py
running build_ext
building 'Bio.cpairwise2' extension
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk
Please check your Xcode installation
gcc -DNDEBUG -g -O3 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -Qunused-arguments -Qunused-arguments -I/Applications/Canopy.app/appdata/canopy-1.4.1.1975.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c Bio/cpairwise2module.c -o build/temp.macosx-10.6-x86_64-2.7/Bio/cpairwise2module.o
clang: warning: no such sysroot directory: '/Developer/SDKs/MacOSX10.6.sdk'
In file included from Bio/cpairwise2module.c:12:
/Applications/Canopy.app/appdata/canopy-1.4.1.1975.macosx- x86_64/Canopy.app/Contents/include/python2.7/Python.h:33:10: fatal error:
'stdio.h' file not found
#include <stdio.h>
^
1 error generated.
error: command 'gcc' failed with exit status 1
I checked that Xcode should be properly installed and working
You should be using pip. Try:
pip install biopython
Uninstalled Canopy and everything worked like a charm...
Try installing the Biopython version available from the Canopy "Package Manager" > "Available Packages" > "Canopy Packages".
This way, I seem to have solved a similar problem while installing Pyensembl, that also installs Biopython.
I tried to install PyCUDA using these instructions: http://wiki.tiker.net/PyCuda/Installation/Linux
and at the point 3 I was compiling with:
su -c "make install"
have this output from console:
running install
running bdist_egg
running egg_info
writing requirements to pycuda.egg-info/requires.txt
writing pycuda.egg-info/PKG-INFO
writing top-level names to pycuda.egg-info/top_level.txt
writing dependency_links to pycuda.egg-info/dependency_links.txt
reading manifest file 'pycuda.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pycuda.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building '_driver' extension
gcc -pthread -DDYNAMIC_ANNOTATIONS_ENABLED=1 -fwrapv -Wall -g -fPIC -DPYGPU_PACKAGE=pycuda -DHAVE_CURAND=1 -DBOOST_PYTHON_SOURCE=1 -DPYGPU_PYCUDA=1 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION=1 -Dboost=pycudaboost -Isrc/cpp -Ibpl-subset/bpl_subset -I/usr/local/cuda/include -I/usr/lib/python3.2/site-packages/numpy/core/include -I/usr/lib/python3.2/site-packages/numpy/core/include -I/usr/include/python3.2mu -c src/cpp/cuda.cpp -o build/temp.linux-x86_64-3.2/src/cpp/cuda.o
Inf ile included from src/cpp/cuda.cpp:1:0:
src/cpp/cuda.hpp:12:18: fatal error: cuda.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
What should I do?
EDIT: My OS is: Arch Linux 3.3.2.1. GPU: Nvidia GF 9600M GS
Instead of su -c "make install" try sudo su - (to become root), and then, as root: make install (after navigating to the right directory)
This one full command worked for me:
sudo pip3 install --global-option=build_ext --global-option="-I/usr/local/cuda/include" --global-option="-L/usr/local/cuda/lib64" pycuda
I'm trying to get Django/Python to work with MySQL, so I'm installing Mysql for Python adapter.
At one point, I discovered that I needed to use the MinGW compiler, so I installed that.
I encountered many annoying problems, and I managed to get past them. This one, however, is especially torturing.
The error occurs when I attempt to execute the following command in command line for Windows:
setup.py install build --compiler=mingw32
Here is the error:
> running install<br> running build<br> running build_py<br> copying
> MySQLdb\release.py -> build\lib.win32-2.7\MySQLdb<br> running
> build_ext<br> building '_mysql' extension<br> gcc.exe -mno-cygwin
> -mdll -O -Wall -Dversion_info=(1,2,3,'final',0) -D__version_
> _=1.2.3 -IC:\Server\MySQL\include -IC:\Python27\include -IC:\Python27\PC -c _mys ql.c -o build\temp.win32-2.7\Release\_mysql.o /Z1<br>
> **gcc: /Z1: No such file or directory<br> gcc: CreateProcess: No such file or directory<br> error: command 'gcc' failed with exit status 1**
Can any of you guys help me out?
This error is caused by /Zl parameter, as they are special parameters used only by VC. We could delete them on setup_window.py.
Since you're talking about MinGW, I'm assuming you're building on Windows. You probably need to add the directory where mingw's gcc binary resides to your PATH.
Assuming it's C:\MinGW32, then you'd do something like:
set PATH=C:\MinGW32\bin;%PATH%
You'd do that before you ran python setup.py install build --compiler=mingw32
Using compiled binaries for windows machine helps. you can get it here http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/
I'm trying to install lxml, on an Ubuntu server running Python 2.6 (in a virtualenv - the system Python is 2.5).
I've checked out via svn and as a result I've also install Cython, as per the instructions.
However, I get the following error when running python setup.py build:
Building lxml version 2.3.alpha1-76211.
Building with Cython 0.11.
Using build configuration of libxslt 1.1.22
Building against libxml2/libxslt in the following directory: /usr/lib
running build
running build_py
running build_ext
cythoning src/lxml/lxml.etree.pyx to src/lxml/lxml.etree.c
Error converting Pyrex file to C:
------------------------------------------------------------
...
c_child = _findChildForwards(c_node, 0)
while c_child is not NULL:
if c_child.type == tree.XML_ELEMENT_NODE:
for i in range(c_tag_count):
if _tagMatchesExactly(c_child, c_ns_tags[2*i], c_ns_tags[2*i+1]):
c_next = _findChildForwards(c_child, 0) or _nextElement(c_child)
^
------------------------------------------------------------
/home/admin/web/blink/lxml/src/lxml/cleanup.pxi:246:64: Cannot assign type 'int' to 'xmlNode *'
Error converting Pyrex file to C:
building 'lxml.etree' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/home/admin/python/2.6.5/include/python2.6 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.6/src/lxml/lxml.etree.o -w
src/lxml/lxml.etree.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
error: command 'gcc' failed with exit status 1
And very similar errors if i try python setup.py bdist_egg, python setup.py build_ext -i or make
Trying to install via easy_install or pip produces the same error - although the former just hangs indefinitely.
As far as I am aware, all of the various dependencies, such as python-dev are installed.
What am I missing / doing wrong?
"I've checked out via svn" ...
"Building lxml version 2.3.alpha1-76211" ...
You appear to be on the bleeding edge. Suggestions: Use a released version of the lxml source. Consult with the lxml author/maintainer.