Install new regex module with setup.py - python

I'm trying to install the new Regex module
The readme.txt says:::
To build and install regex for your default Python run
python setup.py install
To install regex for a specific version run setup.py with that interpreter, e.g.
python3.1 setup.py install
I type in python setup.py install and get back /Library/Frameworks/Python.framework/Versions/7.3/Resources/Python.app/Contents/MacOS/Python: can't open file 'setup.py': [Errno 2] No such file or directory
I'm looking for the answer but people keep referring me to the Python docs and they are confusing.
I know it is really simple but I'm just not sure why it isn't working.

The implicit first step in these instructions is to download a tarball or zip file of regex, unpack it, go into that directory, and there run “python setup.py install”. See http://docs.python.org/2/install/index.html#the-new-standard-distutils
If you have pip installed, you can avoid these manual steps by running “pip install regex”.

It's Easy (On Mac):
Install easy_install
curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python
Install pip
sudo easy_install pip
Install regex module
pip install regex

On Ubuntu and Python3.5, I was having an issue where it wasn't compiling when I try to install regex with pip ( pip install regex) :
Building wheels for collected packages: regex
Running setup.py bdist_wheel for regex ... error
Complete output from command /var/www/envs/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-i08laat0/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/pip-wheel-xlh43fe_ --python-tag cp35:
/var/www/envs/lib/python3.5/site-packages/setuptools/dist.py:397: UserWarning: Normalizing '2018.02.21' to '2018.2.21'
normalized_version,
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
copying regex_3/regex.py -> build/lib.linux-x86_64-3.5
copying regex_3/_regex_core.py -> build/lib.linux-x86_64-3.5
copying regex_3/test_regex.py -> build/lib.linux-x86_64-3.5
running build_ext
building '_regex' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/regex_3
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -I/var/www/envs/include/python3.5m -c regex_3/_regex.c -o build/temp.linux-x86_64-3.5/regex_3/_regex.o
regex_3/_regex.c:46:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for regex
Running setup.py clean for regex
Failed to build regex
Solved that by installing python3-dev : sudo apt-get install python3-dev

Related

pip install <python_package> is stuck. Message to upgrade from pip==9.0.1 to pip==19.0.3 pops up. How to install any new packages using pip 9.0.1?

I've upgraded pip to 19.0.3. Then I removed pip==19.0.3 and reinstalled pip9.0.1. Now every time I try to install anything this message keeps coming up.
You are using pip version 9.0.1, however, version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip'
command.
Please help me out.
Also i'm not able to install any more python packages.
pip install pyAudio
> Collecting pyAudio Using cached
> https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
> Building wheels for collected packages: pyAudio Running setup.py
> bdist_wheel for pyAudio ... error Complete output from command
> /usr/bin/python -u -c "import setuptools,
> tokenize;__file__='/tmp/pip-build-sBep_e/pyAudio/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/tmpJr7LNvpip-wheel- --python-tag cp27: running bdist_wheel
> running build running build_py creating build creating
> build/lib.linux-x86_64-2.7 copying src/pyaudio.py ->
> build/lib.linux-x86_64-2.7 running build_ext building '_portaudio'
> extension creating build/temp.linux-x86_64-2.7 creating
> build/temp.linux-x86_64-2.7/src x86_64-linux-gnu-gcc -pthread
> -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-2.7/src/_portaudiomodule.o
> src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file
> or directory #include "portaudio.h"
> ^~~~~~~~~~~~~ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
> ---------------------------------------- Failed building wheel for pyAudio Running setup.py clean for pyAudio Failed to build
> pyAudio Installing collected packages: pyAudio Running setup.py
> install for pyAudio ... error
> Complete output from command /usr/bin/python -u -c "import setuptools,
> tokenize;__file__='/tmp/pip-build-sBep_e/pyAudio/setup.py';f=getattr(tokenize,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install
> --record /tmp/pip-72KZyy-record/install-record.txt --single-version-externally-managed --compile:
> running install
> running build
> running build_py
> creating build
> creating build/lib.linux-x86_64-2.7
> copying src/pyaudio.py -> build/lib.linux-x86_64-2.7
> running build_ext
> building '_portaudio' extension
> creating build/temp.linux-x86_64-2.7
> creating build/temp.linux-x86_64-2.7/src
> x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-2.7/src/_portaudiomodule.o
> src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file or directory
> #include "portaudio.h"
> ^~~~~~~~~~~~~
> compilation terminated.
> error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
>
> ---------------------------------------- Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-sBep_e/pyAudio/setup.py';f=getattr(tokenize,
> 'open', open)(__file__);code=f.read().replace('\r\n',
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install
> --record /tmp/pip-72KZyy-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-sBep_e/pyAudio/ You are using pip version 9.0.1,
> however version 19.0.3 is available. You should consider upgrading via
> the 'pip install --upgrade pip' command.
Installing pydev solved 'x86_64-linux-gnu-gcc' error for me!
easy as:
sudo apt-get install python-dev
You may also need build-essential for similar issues,
sudo apt-get install build-essential
Hope this helps.
You need to install portaudio dev package:
Download binary files of portaudio from here
Extract it to somewhere
in terminal go to that directory (with cd /where/you/extract/those)
run this command there: ./configure
run this: make
and this one: sudo make install
now you can install portaudio with pip:
$ sudo pip install pyAudio
Installing collected packages: pyAudio
Running setup.py install for pyAudio ... done
Successfully installed pyAudio-0.2.11
Try this sudo apt-get install python-pyaudio.
Thhis should work!
The only thing you need to do is upgrading the pip utility to latest version by using one these commands
pip install pip setuptools -U
or
pip install --upgrade pip
Note: You may need to add 'sudo' as prefix, if you're working on system level python installation.

PYTHON2 Failed building wheel PyAudio & PortAudio

I have problem on PyAudio and PortAudio, i want to use speech_recognition so speech_recognition needs PyAudio module and i tried to install but its not working i search almost everything
And im using ParrotOS & Python 2.7.16.
So i tried that;
pip install install clang
apt-get install & apt-get update but thats doesnt work
When i write the console this code;
sudo pip install portaudio
or
sudo pip install PyAudio
its shows me this;
Collecting pyaudio
Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (setup.py) ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-934KKj/pyaudio/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/pip-wheel-tVvPhL --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying src/pyaudio.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-UboFgi/python2.7-2.7.16~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-2.7/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: portaudio.h: No such file or directory
#include "portaudio.h"
^~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pyaudio
Running setup.py clean for pyaudio
Failed to build pyaudio
and more fail messages.
sudo apt-get install portaudio19-dev
pip install pyaudio
and later i install pyaudio :)

Cryptacular is broken

this weekend our docker image broke because it cannot be build anymore. While looking into the stats, I saw this line:
crypt_blowfish-1.2/crypt.h:17:23: fatal error: gnu-crypt.h: No such file or directory
In more detail:
Running setup.py bdist_wheel for cryptacular: started
Running setup.py bdist_wheel for cryptacular: finished with status 'error'
Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-sayd65k0/cryptacular/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/tmp5734bf55pip-wheel- --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/cryptacular
copying cryptacular/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular
creating build/lib.linux-x86_64-3.6/cryptacular/crypt
copying cryptacular/crypt/test_crypt.py -> build/lib.linux-x86_64-3.6/cryptacular/crypt
copying cryptacular/crypt/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular/crypt
creating build/lib.linux-x86_64-3.6/cryptacular/bcrypt
copying cryptacular/bcrypt/test_bcrypt.py -> build/lib.linux-x86_64-3.6/cryptacular/bcrypt
copying cryptacular/bcrypt/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular/bcrypt
creating build/lib.linux-x86_64-3.6/cryptacular/core
copying cryptacular/core/test_core.py -> build/lib.linux-x86_64-3.6/cryptacular/core
copying cryptacular/core/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular/core
creating build/lib.linux-x86_64-3.6/cryptacular/pbkdf2
copying cryptacular/pbkdf2/test_pbkdf2.py -> build/lib.linux-x86_64-3.6/cryptacular/pbkdf2
copying cryptacular/pbkdf2/__init__.py -> build/lib.linux-x86_64-3.6/cryptacular/pbkdf2
running egg_info
writing cryptacular.egg-info/PKG-INFO
writing dependency_links to cryptacular.egg-info/dependency_links.txt
writing namespace_packages to cryptacular.egg-info/namespace_packages.txt
writing requirements to cryptacular.egg-info/requires.txt
writing top-level names to cryptacular.egg-info/top_level.txt
reading manifest file 'cryptacular.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'cryptacular.egg-info/SOURCES.txt'
copying cryptacular/bcrypt/_bcrypt.c -> build/lib.linux-x86_64-3.6/cryptacular/bcrypt
running build_ext
building 'cryptacular.bcrypt._bcrypt' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/crypt_blowfish-1.2
creating build/temp.linux-x86_64-3.6/cryptacular
creating build/temp.linux-x86_64-3.6/cryptacular/bcrypt
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/local/include/python3.6m -c crypt_blowfish-1.2/crypt_blowfish.c -o build/temp.linux-x86_64-3.6/crypt_blowfish-1.2/crypt_blowfish.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/local/include/python3.6m -c crypt_blowfish-1.2/crypt_gensalt.c -o build/temp.linux-x86_64-3.6/crypt_blowfish-1.2/crypt_gensalt.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/local/include/python3.6m -c crypt_blowfish-1.2/wrapper.c -o build/temp.linux-x86_64-3.6/crypt_blowfish-1.2/wrapper.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNO_BF_ASM -Icrypt_blowfish-1.2/ -I/usr/local/include/python3.6m -c cryptacular/bcrypt/_bcrypt.c -o build/temp.linux-x86_64-3.6/cryptacular/bcrypt/_bcrypt.o
In file included from /usr/local/include/python3.6m/Python.h:39:0,
from cryptacular/bcrypt/_bcrypt.c:26:
crypt_blowfish-1.2/crypt.h:17:23: fatal error: gnu-crypt.h: No such file or directory
#include <gnu-crypt.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for cryptacular
Running setup.py clean for cryptacular
Our implementation works with the package cryptacular which uses bcrypt. None of the packages were updated last week and I dont know where to start.
As additional information, the error occurs in this block of our Dockerfile
RUN apt-get install -y build-essential libfontconfig && \
pip install -q -U pip && \
pip install -q -r requirements.txt && \
apt-get remove -y --purge build-essential && \
apt-get autoremove -y && \
apt-get clean -y
where the requirements.txt uses cryptacular==1.4.1
Edit: We are working with the python:3.6-slim image
I had the same issue running python 3.6.6. With this one liner I was able to install cryptacular from the latest commit.
pipenv install -e hg+https://bitbucket.org/dholth/cryptacular#cb96fb3#egg=cryptacular
You will need to have mercurial installed
apt-get update && apt-get install -y mercurial
More info on this thread
We don't know the error exactly, but last weekend there was an security update in the base image. Therefore we pinned our python image to 3.6.4.
I was able to install using a virtualenv with python 2.7.14, installed via venv
(test) rodrigo#trujillo:/tmp/test $ python --version
Python 2.7.14
(test) rodrigo#trujillo:/tmp/test $ pip --version
pip 10.0.1 from /tmp/test/lib/python2.7/site-packages/pip (python 2.7)
(test) rodrigo#trujillo:/tmp/test $ pip install cryptacular
Collecting cryptacular
Using cached https://files.pythonhosted.org/packages/73/bd/714b3fbfb3392d6b4e658638d9b74f77ce1072725209c08a6becd90836a7/cryptacular-1.4.1.tar.gz
Collecting pbkdf2 (from cryptacular)
Requirement already satisfied: setuptools in ./lib/python2.7/site-packages (from cryptacular) (39.2.0)
Building wheels for collected packages: cryptacular
Running setup.py bdist_wheel for cryptacular ... done
Stored in directory: /home/rodrigo/.cache/pip/wheels/05/cd/1f/64fb0fb06f2735e2ca898935061275465573db7f4f98fa1db4
Successfully built cryptacular
Installing collected packages: pbkdf2, cryptacular
Successfully installed cryptacular-1.4.1 pbkdf2-1.3
(test) rodrigo#trujillo:/tmp/test $ pip list
Package Version
------------- -------
cryptacular 1.4.1
pbkdf2 1.3
pip 10.0.1
pkg-resources 0.0.0
setuptools 39.2.0
wheel 0.31.1
My problem solved by install cryptacular before install apex
Reference: https://github.com/NVIDIA/apex/issues/170#issuecomment-477321199
On Gentoo:
pip3 install -e hg+https://bitbucket.org/dholth/cryptacular#cb96fb3#egg=cryptacular --user
--user flag is required and I didn't have pipenv.
Version:
pip 20.0.2 from /usr/lib/python3.7/site-packages/pip (python 3.7)

portaudio.h: No such file or directory

I got the following error while trying to install pyaudio using pip3 in ubuntu 16.04:
Collecting pyaudio
Downloading PyAudio-0.2.11.tar.gz
Installing collected packages: pyaudio
Running setup.py install for pyaudio ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mxgvewdb/pyaudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-v55chjee-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
copying src/pyaudio.py -> build/lib.linux-x86_64-3.5
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.5/src/_portaudiomodule.o
src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mxgvewdb/pyaudio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-v55chjee-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-mxgvewdb/pyaudio/
This should help
$ sudo apt-get install portaudio19-dev python-pyaudio python3-pyaudio
Tested on Ubuntu 18.04, Python 3.7.2, pyaudio 0.2.11
Added 8th of Jan 2021:
On Ubuntu 20.04 you have to use:
$ sudo apt install portaudio19-dev python3-pyaudio
For Windows, here's what I've been going through...
There're several ways to install PortAudio
vcpkg, https://vcpkg.info/port/portaudio
winget, https://winget.run/pkg/intxcc/pyaudio
Or, manually build from source and install manually
download source, http://files.portaudio.com/download.html
build with cmake, with the matching compiler(msvc/mingw) and arch(x64/x86) to your Python
put "portaudio.h" into python-include directory, e.g. c:\Python38-32\include\
put "portaudio.lib into python-lib directory, e.g. c:\Python38-32\libs
Arrh!
the "min()" macro in pyaudio's soucefile _portaudiomodule.c is troublesome, comment it out manually
pip install pyaudio --no-clean
find _portaudiomodule.c in the temp directory and manually comment-out the "min()" macro e.g. c:\Temp\pip-install-yysb8bme\pyaudio_c92585\src\_portaudiomodule.c
pip install from that directorye.g. pip install c:\Temp\pip-install-yysb8bme\pyaudio_c92585\
Or,3rd party wheels
this answer said:
pip install pipwinpipwin install pyaudio
For MacOS (Intel/Apple Silicon):
Step 1:
brew install portaudio
Step 2:
brew --prefix portaudio
The output provided from the above command, will be required in Step 3, which will look something similar to /opt/homebrew/opt/portaudio
Step 3:
Create .pydistutils.cfg in your home directory
sudo nano ~/.pydistutils.cfg
then paste the following in the file, save and exit
[build_ext]
include_dirs=<PATH FROM STEP 2>/include/
library_dirs=<PATH FROM STEP 2>/lib/
Step 4:
pip3 install pyaudio
For Centos7/RHEL:
yum install portaudio-devel alsa-lib-devel portaudio
pip install pyaudio --user

gevent/libevent.h:9:19: fatal error: event.h: No such file or directory

I was trying to work on Pyladies website on my local folder. I cloned the repo, (https://github.com/pyladies/pyladies) ! and created the virtual environment. However when I do the pip install -r requirements, I am getting this error
Installing collected packages: gevent, greenlet
Running setup.py install for gevent
building 'gevent.core' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -I/opt/local/include -fPIC -I/usr/include/python2.7 -c gevent/core.c -o build/temp.linux-i686-2.7/gevent/core.o
In file included from gevent/core.c:253:0:
gevent/libevent.h:9:19: fatal error: event.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
Complete output from command /home/akoppad/virt/pyladies/bin/python -c "import setuptools;__file__='/home/akoppad/virt/pyladies/build/gevent/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-4MSIGy-record/install-record.txt --install-headers /home/akoppad/virt/pyladies/include/site/python2.7:
running install
running build
running build_py
running build_ext
building 'gevent.core' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -I/opt/local/include -fPIC -I/usr/include/python2.7 -c gevent/core.c -o build/temp.linux-i686-2.7/gevent/core.o
In file included from gevent/core.c:253:0:
gevent/libevent.h:9:19: fatal error: event.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command /home/akoppad/virt/pyladies/bin/python -c "import setuptools;__file__='/home/akoppad/virt/pyladies/build/gevent/setup.py'; exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-4MSIGy-record/install-record.txt --install-headers /home/akoppad/virt/pyladies/include/site/python2.7 failed with error code 1 in /home/akoppad/virt/pyladies/build/gevent
Storing complete log in /home/akoppad/.pip/pip.log.
I tried doing this,
sudo port install libevent
CFLAGS="-I /opt/local/include -L /opt/local/lib" pip install gevent
It says port command not found.
I am not sure how to proceed with this. Thanks!
I had the same problem and just as the other answer suggested I had to install "libevent". It's apparently not called "libevent-devel" anymore (apt-get couldn't find it) but doing:
$ apt-cache search libevent
listed a bunch of available packages.
$ apt-get install libevent-dev
worked for me.
I think you just forget to install the "libevent" in the environment. If you are on a OSX machine, please try to install brew here http://mxcl.github.io/homebrew/ and use brew install libevent to install the dependency. If you are on an ubuntu machine, you can try apt-get to install the corresponding library.
I had this issue while trying to
pip install Flask-Sockets
and
sudo apt-get install libevent-dev
worked for me
yum install libevent-*
This command works for me because I am on centos.
I ran into this error on MacOS 10.10.1 (Yosemite) running pip install. The solution for me was to add the path to libevent which pip was missing. These are C files, and CFLAGS and DFLAGS are bash environment variables that let pip know where to find these files. On my system, libevent is found at /usr/local/include/event2.
$ CFLAGS=-I/usr/local/include/event2 DFLAGS=-L/usr/local/lib pip install -r requires.txt

Categories