I can not install a package or create a virtual environment:
mike@mike-Inspiron-3543:~/Documents/programming/recordwrite$ python -m pip install pyaudio --user
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 /home/mike/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-090irkg_/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-pj974zkh --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
copying src/pyaudio.py -> build/lib.linux-x86_64-3.6
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mike/anaconda3/include/python3.6m -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.6/src/_portaudiomodule.o
src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
compilation terminated.
error: command '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 /home/mike/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-090irkg_/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-record-k4v5z2mv/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
copying src/pyaudio.py -> build/lib.linux-x86_64-3.6
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mike/anaconda3/include/python3.6m -c src/_portaudiomodule.c -o build/temp.linux-x86_64-3.6/src/_portaudiomodule.o
src/_portaudiomodule.c:29:23: fatal error: portaudio.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/home/mike/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-090irkg_/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-record-k4v5z2mv/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-090irkg_/pyaudio/
And when I try to create an environment it tells me that it returned a non-zero exit status, which, in my opinion, means there are errors:
mike@mike-Inspiron-3543:~/Documents/programming/recordwrite$ python3 -m venv envError: Command '['/home/mike/Documents/programming/recordwrite/env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
I still managed to create an environment without pip
and reinstalling it later but it's really a nuisance.
Here is my version of Python:
mike@mike-Inspiron-3543:~/Documents/programming/useful/extractText$ python -V
Python 3.6.0 :: Anaconda custom (64-bit)
When I try to create the virtual environment that I have, the terminal answers:
mike@mike-Inspiron-3543:~/Documents/programming/useful/extractText$ python -m virtualenv env
Using base prefix '/home/mike/anaconda3'
New python executable in /home/mike/Documents/programming/useful/extractText/env/bin/python
/home/mike/Documents/programming/useful/extractText/env/bin/python: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
ERROR: The executable /home/mike/Documents/programming/useful/extractText/env/bin/python is not functioning
ERROR: It thinks sys.prefix is '/home/mike/Documents/programming/useful/extractText' (should be '/home/mike/Documents/programming/useful/extractText/env')
ERROR: virtualenv is not compatible with this system or executable
And when I try to activate it, there is no activate
:
mike@mike-Inspiron-3543:~/Documents/programming/useful/extractText/env/bin$ ls
python python3 python3.6