Building wheel for psycopg2 ... error pip3 install psycopg2? - python

When I'm running
pip3 install -r requirements.txt
then show me errors I show you bellow
I'm using
python version 3.8
PostgreSQL 13.0 (Ubuntu 13.0-1.pgdg20.04+1)
see my requirement.txt files here
certifi==2018.4.16
chardet==3.0.4
click==6.7
croniter==0.3.24
Django==2.0.5
django-rq==1.1.0
et-xmlfile==1.0.1
idna==2.7
jdcal==1.4
lxml==4.2.3
openpyxl==2.5.4
#pkg-resources==0.0.0
psycopg2==2.7.5
psycopg2-binary==2.8.5
python-dateutil==2.7.3
python-decouple==3.1
pytz==2018.5
redis==2.10.6
requests==2.19.1
rq==0.12.0
rq-scheduler==0.8.3
six==1.11.0
Unipath==1.1
urllib3==1.23
so show me this error in terminal I share with you complete command message that i typed already
pip3 install -r requirements.txt  ✔  2186  17:28:42
Requirement already satisfied: certifi==2018.4.16 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 1)) (2018.4.16)
Requirement already satisfied: chardet==3.0.4 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 2)) (3.0.4)
Requirement already satisfied: click==6.7 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 3)) (6.7)
Requirement already satisfied: croniter==0.3.24 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 4)) (0.3.24)
Requirement already satisfied: Django==2.0.5 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 5)) (2.0.5)
Requirement already satisfied: django-rq==1.1.0 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 6)) (1.1.0)
Requirement already satisfied: et-xmlfile==1.0.1 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 7)) (1.0.1)
Requirement already satisfied: idna==2.7 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 8)) (2.7)
Requirement already satisfied: jdcal==1.4 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 9)) (1.4)
Requirement already satisfied: lxml==4.2.3 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 10)) (4.2.3)
Requirement already satisfied: openpyxl==2.5.4 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 11)) (2.5.4)
Collecting psycopg2==2.7.5
Using cached psycopg2-2.7.5.tar.gz (426 kB)
Collecting psycopg2-binary==2.8.5
Downloading psycopg2_binary-2.8.5-cp38-cp38-manylinux1_x86_64.whl (3.0 MB)
|████████████████████████████████| 3.0 MB 101 kB/s
Requirement already satisfied: python-dateutil==2.7.3 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 15)) (2.7.3)
Processing /code/data/.cache/pip/wheels/34/e3/10/a284f71c3b99a9ed3ab3d7d6f3af2dd72855bf04aa763dfef5/python_decouple-3.1-py3-none-any.whl
Requirement already satisfied: pytz==2018.5 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 17)) (2018.5)
Collecting redis==2.10.6
Using cached redis-2.10.6-py2.py3-none-any.whl (64 kB)
Collecting requests==2.19.1
Using cached requests-2.19.1-py2.py3-none-any.whl (91 kB)
Collecting rq==0.12.0
Using cached rq-0.12.0-py2.py3-none-any.whl (54 kB)
Collecting rq-scheduler==0.8.3
Using cached rq_scheduler-0.8.3-py2.py3-none-any.whl (14 kB)
Collecting six==1.11.0
Using cached six-1.11.0-py2.py3-none-any.whl (10 kB)
Requirement already satisfied: Unipath==1.1 in /code/data/.local/lib/python3.8/site-packages (from -r requirements.txt (line 23)) (1.1)
Collecting urllib3==1.23
Using cached urllib3-1.23-py2.py3-none-any.whl (133 kB)
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wg77t_ou/psycopg2/setup.py'"'"'; __file__='"
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wg77t_ou/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wg77t_ou/psycopg2/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-_y3ne80g
cwd: /tmp/pip-install-wg77t_ou/psycopg2/
Complete output (72 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/psycopg1.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2
creating build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_with.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_types_basic.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_async_keyword.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_extras_dictcursor.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/__init__.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_types_extras.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_psycopg2_dbapi20.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/testutils.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_green.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_copy.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_bugX000.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_module.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_cancel.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_lobject.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_dates.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_quote.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_replication.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_sql.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_errcodes.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/dbapi20_tpc.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/testconfig.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_connection.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_bug_gc.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_cursor.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_async.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_fast_executemany.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_notify.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_transaction.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/dbapi20.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
Skipping optional fixer: buffer
Skipping optional fixer: idioms
Skipping optional fixer: set_literal
Skipping optional fixer: ws_comma
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/psycopg
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.5 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130000 -DHAVE_LO64=1 -I/usr/include/python3.8 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.8/psycopg/psycopgmodule.o -Wdeclaration-after-statement
psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’:
psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
689 | while (interp->next)
| ^~
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
Installing collected packages: psycopg2, psycopg2-binary, python-decouple, redis, urllib3, requests, rq, rq-scheduler, six
Attempting uninstall: psycopg2
Found existing installation: psycopg2 2.8.6
Uninstalling psycopg2-2.8.6:
Successfully uninstalled psycopg2-2.8.6
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wg77t_ou/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wg77t_ou/psycopg2/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-8sijq8ua/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /code/data/.local/include/python3.8/psycopg2
cwd: /tmp/pip-install-wg77t_ou/psycopg2/
Complete output (72 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/psycopg2
copying lib/extensions.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/__init__.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/tz.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/errorcodes.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_range.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/sql.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/pool.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_json.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/psycopg1.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/extras.py -> build/lib.linux-x86_64-3.8/psycopg2
copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2
creating build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_with.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_types_basic.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_async_keyword.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_extras_dictcursor.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/__init__.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_types_extras.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_psycopg2_dbapi20.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/testutils.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_green.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_copy.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_bugX000.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_module.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_cancel.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_lobject.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_dates.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_quote.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_replication.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_sql.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_errcodes.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/dbapi20_tpc.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/testconfig.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_connection.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_bug_gc.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_cursor.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_async.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_fast_executemany.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_notify.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/test_transaction.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
copying tests/dbapi20.py -> build/lib.linux-x86_64-3.8/psycopg2/tests
Skipping optional fixer: buffer
Skipping optional fixer: idioms
Skipping optional fixer: set_literal
Skipping optional fixer: ws_comma
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/psycopg
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION=2.7.5 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=130000 -DHAVE_LO64=1 -I/usr/include/python3.8 -I. -I/usr/include/postgresql -I/usr/include/postgresql/13/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.8/psycopg/psycopgmodule.o -Wdeclaration-after-statement
psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’:
psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete type ‘PyInterpreterState’ {aka ‘struct _is’}
689 | while (interp->next)
| ^~
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Rolling back uninstall of psycopg2
Moving to /code/data/.local/lib/python3.8/site-packages/psycopg2-2.8.6-py3.8.egg-info
from /code/data/.local/lib/python3.8/site-packages/~sycopg2-2.8.6-py3.8.egg-info
Moving to /code/data/.local/lib/python3.8/site-packages/psycopg2/
from /code/data/.local/lib/python3.8/site-packages/~sycopg2
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wg77t_ou/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wg77t_ou/psycopg2/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-8sijq8ua/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /code/data/.local/include/python3.8/psycopg2 Check the logs for full command output.
from requirement.txt
#psycopg2==2.7.5
#psycopg2-binary==2.8.5
when I comment above then error is gone but absolutely database not work properly then.
but if I try python3 manage.py runserver
then show me also error
from lawyers.views import *
File "/code/data/abc/proj/lawyers/views.py", line 37, in <module>
from django_rq import job
File "/code/data/.local/lib/python3.8/site-packages/django_rq/__init__.py", line 3, in <module>
from .decorators import job
File "/code/data/.local/lib/python3.8/site-packages/django_rq/decorators.py", line 6, in <module>
from .queues import get_queue
SyntaxError: invalid syntax (queues.py, line 132)
I think error show me in django_rq
when type python3 manage.py runserver
tell me the possible solutions thank you I try many but unsuccessful

I solve my problem work for me
basically issue also with python
version I install python version 3.7 by using this command
sudo apt-get install python3.7
then activate environment
source env/bin/activate
Then I install my requirements.txt files by using this command
python3.7 -m pip install requirements.txt
my this error resolved not show me again
Building wheel for psycopg2 … error pip3 install psycopg2?
then show me
ModuleNotFoundError: No module named 'pandas'
then I install using this way
python3.7 -m pip install pandas
When I run python3.7 manage.py runserver
Then show me error is django-rq
/code/data/.local/lib/python3.7/site-packages/django_rq/queues.py", line 132
def get_queue(name='default', default_timeout=None, async=None,
^
I this so async is reserved word now in python then in my package I replace the name of async to is_async in whole django-rq/queues.py
when I run project again then show me this error
import xlsxwriter
ModuleNotFoundError: No module named 'xlsxwriter'
Then I fix by this way
python3.7 -m pip install xlsxwriter
Then show me one more error
from bs4 import BeautifulSoup
ModuleNotFoundError: No module named 'bs4'
Then I fixed using this way
python3.7 -m pip install bs4
Then my project work fine.
I hope my solution is helpful for anyone.
I have require temporarily python3.7 version so I'm not wanted to change their path to python3 .

Related

How does one install torchmeta for a ppc64le architecture in pytorch?

I was trying to use torchmeta in a ppc64le architecture. Unfortunately it's not been easy to install since ppc64le requires special binaries to work.
I eventually managed to get the right binaries for pytorch and torchvision by following these instructions (that prepend the right ibm channel with the conda binaries, plus installs all the required files too):
conda config --prepend channels https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda/
conda create -n my_new_env python=3.7 powerai=1.7.0
conda activate my_new_env
after that I proceeded to install the right version of torchmeta, which was 1.3.1 since ppc64le only has pytorch 1.3.1 and torchvision 0.4.2. So I did:
pip install torchmeta==1.3.1
but now I have a new error that it cannot find the right version of h5py compatible with what I want to do. The error message is to large to paste but I will paste what I hope are useful part of it:
(my_new_env) [miranda9#hal-login ~]$ pip install torchmeta==1.3.1
Collecting torchmeta==1.3.1
Using cached torchmeta-1.3.1-py3-none-any.whl (144 kB)
Requirement already satisfied: requests in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from torchmeta==1.3.1) (2.22.0)
Requirement already satisfied: torchvision<0.6.0,>=0.4.0 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from torchmeta==1.3.1) (0.4.2)
Requirement already satisfied: torch<1.5.0,>=1.3.0 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from torchmeta==1.3.1) (1.3.1)
Processing ./.cache/pip/wheels/87/f5/ad/9f04a48453875e8054c19f9fe3f50cbbe0c09b956835555019/Pillow-6.2.2-cp37-cp37m-linux_ppc64le.whl
Requirement already satisfied: numpy>=1.14.0 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from torchmeta==1.3.1) (1.17.4)
Requirement already satisfied: tqdm>=4.0.0 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from torchmeta==1.3.1) (4.36.1)
Collecting h5py~=2.9.0
Using cached h5py-2.9.0.tar.gz (287 kB)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from requests->torchmeta==1.3.1) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from requests->torchmeta==1.3.1) (2020.6.20)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from requests->torchmeta==1.3.1) (1.25.10)
Requirement already satisfied: idna<2.9,>=2.5 in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from requests->torchmeta==1.3.1) (2.8)
Requirement already satisfied: six in ./.conda/envs/my_new_env/lib/python3.7/site-packages (from torchvision<0.6.0,>=0.4.0->torchmeta==1.3.1) (1.13.0)
Building wheels for collected packages: h5py
Building wheel for h5py (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/miranda9/.conda/envs/my_new_env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bpmeop26/h5py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bpmeop26/h5py/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-ccg1oj0n
cwd: /tmp/pip-install-bpmeop26/h5py/
Complete output (1321 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-ppc64le-3.7
creating build/lib.linux-ppc64le-3.7/h5py
copying h5py/__init__.py -> build/lib.linux-ppc64le-3.7/h5py
copying h5py/h5py_warnings.py -> build/lib.linux-ppc64le-3.7/h5py
copying h5py/highlevel.py -> build/lib.linux-ppc64le-3.7/h5py
copying h5py/ipy_completer.py -> build/lib.linux-ppc64le-3.7/h5py
copying h5py/version.py -> build/lib.linux-ppc64le-3.7/h5py
creating build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/__init__.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/attrs.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/base.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/compat.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/dataset.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/datatype.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/dims.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/files.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/filters.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/group.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/selections.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/selections2.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
copying h5py/_hl/vds.py -> build/lib.linux-ppc64le-3.7/h5py/_hl
creating build/lib.linux-ppc64le-3.7/h5py/tests
copying h5py/tests/__init__.py -> build/lib.linux-ppc64le-3.7/h5py/tests
copying h5py/tests/common.py -> build/lib.linux-ppc64le-3.7/h5py/tests
creating build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/__init__.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_attrs.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_attrs_data.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_base.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_dataset.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_datatype.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_dimension_scales.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_file.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_file_image.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_group.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_h5.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_h5d_direct_chunk_write.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_h5f.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_h5p.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_h5t.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_objects.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_selections.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
copying h5py/tests/old/test_slicing.py -> build/lib.linux-ppc64le-3.7/h5py/tests/old
creating build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/__init__.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_attribute_create.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_dataset_getitem.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_dataset_swmr.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_datatype.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_deprecation.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_dims_dimensionproxy.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_file.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_filters.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
copying h5py/tests/hl/test_threads.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl
creating build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
copying h5py/tests/hl/test_vds/__init__.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
copying h5py/tests/hl/test_vds/test_highlevel_vds.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
copying h5py/tests/hl/test_vds/test_lowlevel_vds.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
copying h5py/tests/hl/test_vds/test_virtual_source.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
running build_ext
Autodetected HDF5 1.10.2
********************************************************************************
Summary of the h5py configuration
Path to HDF5: None
HDF5 Version: '1.10.2'
MPI Enabled: False
Rebuild Required: True
********************************************************************************
Executing api_gen rebuild of defs
Executing cythonize()
[ 1/22] Cythonizing /tmp/pip-install-bpmeop26/h5py/h5py/_conv.pyx
/tmp/pip-install-bpmeop26/h5py/.eggs/Cython-0.29.21-py3.7.egg/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-bpmeop26/h5py/h5py/_conv.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
...
/home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with " \
^
In file included from /tmp/pip-install-bpmeop26/h5py/h5py/defs.c:654:0:
/tmp/pip-install-bpmeop26/h5py/h5py/api_compat.h:27:18: fatal error: hdf5.h: No such file or directory
#include "hdf5.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for h5py
Running setup.py clean for h5py
Failed to build h5py
DEPRECATION: Could not build wheels for h5py which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: Pillow, h5py, torchmeta
Attempting uninstall: Pillow
Found existing installation: Pillow 7.1.2
Uninstalling Pillow-7.1.2:
Successfully uninstalled Pillow-7.1.2
Attempting uninstall: h5py
Found existing installation: h5py 2.8.0
Uninstalling h5py-2.8.0:
Successfully uninstalled h5py-2.8.0
Running setup.py install for h5py ... error
ERROR: Command errored out with exit status 1:
command: /home/miranda9/.conda/envs/my_new_env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bpmeop26/h5py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bpmeop26/h5py/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-hlwpfooj/install-record.txt --single-version-externally-managed --compile --install-headers /home/miranda9/.conda/envs/my_new_env/include/python3.7m/h5py
...
copying h5py/tests/hl/test_vds/test_lowlevel_vds.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
copying h5py/tests/hl/test_vds/test_virtual_source.py -> build/lib.linux-ppc64le-3.7/h5py/tests/hl/test_vds
running build_ext
Autodetected HDF5 1.10.2
********************************************************************************
Summary of the h5py configuration
Path to HDF5: None
HDF5 Version: '1.10.2'
MPI Enabled: False
Rebuild Required: True
********************************************************************************
Executing cythonize()
[ 1/22] Cythonizing /tmp/pip-install-bpmeop26/h5py/h5py/_conv.pyx
/tmp/pip-install-bpmeop26/h5py/.eggs/Cython-0.29.21-py3.7.egg/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-bpmeop26/h5py/h5py/_conv.pxd
...
warning: h5py/api_types_hdf5.pxd:730:6: 'H5Z_ERROR_EDC' redeclared
warning: h5py/api_types_hdf5.pxd:731:6: 'H5Z_DISABLE_EDC' redeclared
warning: h5py/api_types_hdf5.pxd:732:6: 'H5Z_ENABLE_EDC' redeclared
warning: h5py/api_types_hdf5.pxd:733:6: 'H5Z_NO_EDC' redeclared
building 'h5py.defs' extension
creating build/temp.linux-ppc64le-3.7
creating build/temp.linux-ppc64le-3.7/tmp
creating build/temp.linux-ppc64le-3.7/tmp/pip-install-bpmeop26
creating build/temp.linux-ppc64le-3.7/tmp/pip-install-bpmeop26/h5py
creating build/temp.linux-ppc64le-3.7/tmp/pip-install-bpmeop26/h5py/h5py
gcc -pthread -B /home/miranda9/.conda/envs/my_new_env/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DH5_USE_16_API -I./h5py -I/tmp/pip-install-bpmeop26/h5py/lzf -I/opt/local/include -I/usr/local/include -I/home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/numpy/core/include -I/home/miranda9/.conda/envs/my_new_env/include/python3.7m -c /tmp/pip-install-bpmeop26/h5py/h5py/defs.c -o build/temp.linux-ppc64le-3.7/tmp/pip-install-bpmeop26/h5py/h5py/defs.o
In file included from /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830:0,
from /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from /tmp/pip-install-bpmeop26/h5py/h5py/api_compat.h:26,
from /tmp/pip-install-bpmeop26/h5py/h5py/defs.c:654:
/home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it with " \
^
In file included from /tmp/pip-install-bpmeop26/h5py/h5py/defs.c:654:0:
/tmp/pip-install-bpmeop26/h5py/h5py/api_compat.h:27:18: fatal error: hdf5.h: No such file or directory
#include "hdf5.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Rolling back uninstall of h5py
Moving to /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/h5py
from /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/~5py
Moving to /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/h5py-2.8.0-py3.7.egg-info
from /home/miranda9/.conda/envs/my_new_env/lib/python3.7/site-packages/~5py-2.8.0-py3.7.egg-info
ERROR: Command errored out with exit status 1: /home/miranda9/.conda/envs/my_new_env/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bpmeop26/h5py/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bpmeop26/h5py/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-hlwpfooj/install-record.txt --single-version-externally-managed --compile --install-headers /home/miranda9/.conda/envs/my_new_env/include/python3.7m/h5py Check the logs for full command output.
anyone know how I can successfully install a working torchmeta version in a ppc64le (using wmcle 1.7.0)?
related:
gitissue for torchmeta: https://github.com/tristandeleu/pytorch-meta/issues/95
IBM gitissue for torchmeta support: https://github.com/IBM/powerai/issues/269
h5py gitissue for torchmeta: https://github.com/h5py/h5py/issues/1678
IBM h5py support for torchmeta: https://github.com/IBM/powerai/issues/270
Because there are not wheels for powerpc for h5py you are installing h5py from source (from the tarball). This requires both the Python and h5py development headers to be available, see https://docs.h5py.org/en/stable/build.html#source-installation.
Either install h5py from conda or install the required build dependencies.

ERROR: MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform

So I am setting up an old project it's Python 2 and Django 1 where I'm stuck with the installation of requirement.txt. This is the main error I'm getting while installing
Building wheel for MySQL-python (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/rehman/projects/cjs/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-KyvPG6/MySQL-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-KyvPG6/MySQL-python/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-jCT7NK
cwd: /tmp/pip-install-KyvPG6/MySQL-python/
Complete output (38 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
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-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
In file included from _mysql.c:44:
/usr/include/mariadb/my_config.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
#warning This file should not be included by clients, include only <mysql.h>
^~~~~~~
In file included from _mysql.c:46:
/usr/include/mariadb/mysql.h:444:3: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
MYSQL_CLIENT_PLUGIN_HEADER
^~~~~~~~~~~~~~~~~~~~~~~~~~
_mysql.c: In function ‘_mysql_ConnectionObject_ping’:
_mysql.c:2005:41: error: ‘MYSQL’ {aka ‘struct st_mysql’} has no member named ‘reconnect’
if ( reconnect != -1 ) self->connection.reconnect = reconnect;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for MySQL-python
Running setup.py clean for MySQL-python
Building wheel for torctl (setup.py) ... done
Created wheel for torctl: filename=torctl-0.2-py2-none-any.whl size=67317 sha256=3cfc42c3313ca9a9b220dc844f65156a0134bb5c7f63dba0327fefe57fb64705
Stored in directory: /tmp/pip-ephem-wheel-cache-M4548v/wheels/c4/3a/87/1d604378e37b4c4d4c07b26c7866955102de8d824553cec0ec
Successfully built torctl
Failed to build MySQL-python
Installing collected packages: Django, pycrypto, six, ecdsa, paramiko, Fabric, GeoIP, Markdown, MySQL-python, Pillow, Unidecode, amqp, anyjson, beautifulsoup4, billiard, pytz, kombu, celery, colorama, configobj, django-celery, django-filter, django-mailchimp-v1.3, djangorestframework, httplib2, uritemplate, pyasn1, rsa, pyasn1-modules, oauth2client, google-api-python-client, html5lib, meld3, mysql-connector, oauth2, python-Levenshtein, python-dateutil, redis, requests, stripe, supervisor, urllib3, vine, pyyaml, ua-parser, user-agents, django-user-agents, contextlib2, raven, enum34, ipaddress, pycparser, cffi, cryptography, PyOpenSSL, ndg-httpsclient, pycryptodomex, future, pyjwkest, python-openid, oauthlib, requests-oauthlib, PyJWT, social-auth-core, social-auth-app-django, django-js-asset, django-ckeditor, django-compat, django-hijack, django-hijack-admin, torctl
Running setup.py install for MySQL-python ... error
ERROR: Command errored out with exit status 1:
command: /home/rehman/projects/cjs/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-KyvPG6/MySQL-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-KyvPG6/MySQL-python/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-nSvXLQ/install-record.txt --single-version-externally-managed --compile --install-headers /home/rehman/projects/cjs/include/site/python2.7/MySQL-python
cwd: /tmp/pip-install-KyvPG6/MySQL-python/
Complete output (38 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
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-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mariadb -I/usr/include/mariadb/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
In file included from _mysql.c:44:
/usr/include/mariadb/my_config.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
#warning This file should not be included by clients, include only <mysql.h>
^~~~~~~
In file included from _mysql.c:46:
/usr/include/mariadb/mysql.h:444:3: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
MYSQL_CLIENT_PLUGIN_HEADER
^~~~~~~~~~~~~~~~~~~~~~~~~~
_mysql.c: In function ‘_mysql_ConnectionObject_ping’:
_mysql.c:2005:41: error: ‘MYSQL’ {aka ‘struct st_mysql’} has no member named ‘reconnect’
if ( reconnect != -1 ) self->connection.reconnect = reconnect;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/rehman/projects/comparedjs/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-KyvPG6/MySQL-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-KyvPG6/MySQL-python/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-nSvXLQ/install-record.txt --single-version-externally-managed --compile --install-headers /home/rehman/projects/cjs/include/site/python2.7/MySQL-python Check the logs for full command output.
This is requirement.txt
Django==1.9.7
Fabric==1.11.1
GeoIP==1.3.2
Markdown==2.6.6
MySQL-python==1.2.5
Pillow==3.3.0
Unidecode==0.04.19
amqp==1.4.9
anyjson==0.3.3
argparse==1.2.1
beautifulsoup4==4.2.1
billiard==3.3.0.22
celery==3.1.18
colorama==0.2.5
configobj
django-celery==3.1.17
django-filter==0.13.0
django-mailchimp-v1.3==1.4.0
djangorestframework==3.4.1
google-api-python-client==1.6.2
html5lib==0.999
httplib2==0.10.3
kombu==3.0.37
#newspaper == 0.1.0.7
meld3==1.0.2
mysql-connector
oauth2
oauth2client
#pyinotify
#pyserial
python-Levenshtein
python-dateutil
redis
requests==2.9.1
six==1.10.0
#ssh-import-id
stripe==1.46.0
supervisor==3.2.1
git+https://github.com/aaronsw/pytorctl.git
uritemplate==3.0.0
urllib3==1.7.1
vine==1.1.3
wsgiref==0.1.2
#zope.interface==4.0.5
pyyaml
ua-parser
user-agents
django-user-agents
raven
pyasn1
ndg-httpsclient
pyjwkest
social-auth-app-django
social-auth-core
django-ckeditor==5.4.0
django-hijack
django-hijack-admin
What I searched and got a clue that its somewhat related to the wheel, it's causing the issue and by this link I get to know that I need to download a .whl file and extract it manually for MySQL-python so I found 2 files through this link and when I try to execute .whl file by pip install MySQL_python-1.2.5-cp27-none-win32.whl it's giving me error ERROR: MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform.
I eventually figured out its for Windows platform. So if mysql-python is for Windows platform what do I install for Linux? I am using Debian 10.
Simply install mysqlclient instead of MySQL-python, it's a drop-in replacement that's more maintained.

ipython3 and jupyter notebook not allowing python3 opition

Okay, I know I am probably going to receive a cluster of down votes after having been unable to solve this issue, but I am fairly new to python and jupyter notebook. So far I have only been able to use python3 with jupyter notebook once upon initial set up and ever since then it has defied all logic and despite ipython being the backend of jupyter notebook, stating it no longer supports python2 like some progressive and want's nothing to do with pyhton2 anymore; python2 is bunked down in my notebook like the Russians at Stalingrad and I fear I may not be able to drive the Bolshevik out.
So like a good little boy I make my own venv environment and try and install ipython for python3 [you know - the only version that matters according to their website]:
main#McCarter:~/Desktop
$ sudo python3 -m venv /Documents/Intro-to-Pandas
main#McCarter:~/Desktop
$ source /Documents/Intro-to-Pandas/bin/activate
(Intro-to-Pandas) main#McCarter:~/Desktop
$ python3 -m pip --version
pip 9.0.1 from /Documents/Intro-to-Pandas/lib/python3.5/site-packages (python 3.5)
(Intro-to-Pandas) main#McCarter:~/Desktop
$ python3 -m pip install ipykernel
After which I receive errors which I root down to being an issue with installing tornado. SO I try installing tornado with pip and sudo apt install. I even try installing the infamous anaconda, a program who's developers I am sure take great pride in their software destroying all paths and being akin to the Manhattan project to set up:
(Intro-to-Pandas) main#McCarter:~/Desktop
$ python3 -m pip install ipykernel
Collecting ipykernel
Using cached https://files.pythonhosted.org/packages/d8/b0/f0be5c5ab335196f5cce96e5b889a4fcf5bfe462eb0acc05cd7e2caf65eb/ipykernel-5.1.0-py3-none-any.whl
Collecting tornado>=4.2 (from ipykernel)
Using cached https://files.pythonhosted.org/packages/b1/7f/8109821ff9df1bf3519169e34646705c32ac13be6a4d51a79ed57f47686e/tornado-6.0.1.tar.gz
Collecting traitlets>=4.1.0 (from ipykernel)
Using cached https://files.pythonhosted.org/packages/93/d6/abcb22de61d78e2fc3959c964628a5771e47e7cc60d53e9342e21ed6cc9a/traitlets-4.3.2-py2.py3-none-any.whl
Collecting jupyter-client (from ipykernel)
Using cached https://files.pythonhosted.org/packages/3b/c3/3043fe9ffd140d03c9d091a056794ccdc427c56ec19b8eea74f9ea0a498f/jupyter_client-5.2.4-py2.py3-none-any.whl
Collecting ipython>=5.0.0 (from ipykernel)
Using cached https://files.pythonhosted.org/packages/46/b5/ca080401b8dbde51a0f4377b4e22ce02b266340a1cda389b6dea702d06d1/ipython-7.4.0-py3-none-any.whl
Collecting decorator (from traitlets>=4.1.0->ipykernel)
Using cached https://files.pythonhosted.org/packages/5f/88/0075e461560a1e750a0dcbf77f1d9de775028c37a19a346a6c565a257399/decorator-4.4.0-py2.py3-none-any.whl
Collecting six (from traitlets>=4.1.0->ipykernel)
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting ipython-genutils (from traitlets>=4.1.0->ipykernel)
Using cached https://files.pythonhosted.org/packages/fa/bc/9bd3b5c2b4774d5f33b2d544f1460be9df7df2fe42f352135381c347c69a/ipython_genutils-0.2.0-py2.py3-none-any.whl
Collecting python-dateutil>=2.1 (from jupyter-client->ipykernel)
Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Collecting jupyter-core (from jupyter-client->ipykernel)
Using cached https://files.pythonhosted.org/packages/1d/44/065d2d7bae7bebc06f1dd70d23c36da8c50c0f08b4236716743d706762a8/jupyter_core-4.4.0-py2.py3-none-any.whl
Collecting pyzmq>=13 (from jupyter-client->ipykernel)
Using cached https://files.pythonhosted.org/packages/39/7a/9b98aabbde03fc4c5c38079ddec1331af3846d80c0b73bdb691a21adee9c/pyzmq-18.0.1-cp35-cp35m-manylinux1_x86_64.whl
Collecting pickleshare (from ipython>=5.0.0->ipykernel)
Using cached https://files.pythonhosted.org/packages/9a/41/220f49aaea88bc6fa6cba8d05ecf24676326156c23b991e80b3f2fc24c77/pickleshare-0.7.5-py2.py3-none-any.whl
Collecting pygments (from ipython>=5.0.0->ipykernel)
Using cached https://files.pythonhosted.org/packages/13/e5/6d710c9cf96c31ac82657bcfb441df328b22df8564d58d0c4cd62612674c/Pygments-2.3.1-py2.py3-none-any.whl
Collecting backcall (from ipython>=5.0.0->ipykernel)
Using cached https://files.pythonhosted.org/packages/84/71/c8ca4f5bb1e08401b916c68003acf0a0655df935d74d93bf3f3364b310e0/backcall-0.1.0.tar.gz
Collecting jedi>=0.10 (from ipython>=5.0.0->ipykernel)
Using cached https://files.pythonhosted.org/packages/25/2b/1f188901be099d52d7b06f4d3b7cb9f8f09692c50697b139eaf6fa2928d8/jedi-0.13.3-py2.py3-none-any.whl
Collecting prompt-toolkit<2.1.0,>=2.0.0 (from ipython>=5.0.0->ipykernel)
Using cached https://files.pythonhosted.org/packages/f7/a7/9b1dd14ef45345f186ef69d175bdd2491c40ab1dfa4b2b3e4352df719ed7/prompt_toolkit-2.0.9-py3-none-any.whl
Collecting pexpect; sys_platform != "win32" (from ipython>=5.0.0->ipykernel)
Using cached https://files.pythonhosted.org/packages/89/e6/b5a1de8b0cc4e07ca1b305a4fcc3f9806025c1b651ea302646341222f88b/pexpect-4.6.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=18.5 in /Documents/Intro-to-Pandas/lib/python3.5/site-packages (from ipython>=5.0.0->ipykernel)
Collecting parso>=0.3.0 (from jedi>=0.10->ipython>=5.0.0->ipykernel)
Using cached https://files.pythonhosted.org/packages/19/b1/522b2671cc6d134c9d3f5dfc0d02fee07cab848e908d03d2bffea78cca8f/parso-0.3.4-py2.py3-none-any.whl
Collecting wcwidth (from prompt-toolkit<2.1.0,>=2.0.0->ipython>=5.0.0->ipykernel)
Using cached https://files.pythonhosted.org/packages/7e/9f/526a6947247599b084ee5232e4f9190a38f398d7300d866af3ab571a5bfe/wcwidth-0.1.7-py2.py3-none-any.whl
Collecting ptyprocess>=0.5 (from pexpect; sys_platform != "win32"->ipython>=5.0.0->ipykernel)
Using cached https://files.pythonhosted.org/packages/d1/29/605c2cc68a9992d18dada28206eeada56ea4bd07a239669da41674648b6f/ptyprocess-0.6.0-py2.py3-none-any.whl
Building wheels for collected packages: tornado, backcall
Running setup.py bdist_wheel for tornado ... error
Complete output from command /Documents/Intro-to-Pandas/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-jgyop2hc/tornado/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/tmpj4fqywe1pip-wheel- --python-tag cp35:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for tornado
Running setup.py clean for tornado
Running setup.py bdist_wheel for backcall ... error
Complete output from command /Documents/Intro-to-Pandas/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-jgyop2hc/backcall/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/tmps7t3djcqpip-wheel- --python-tag cp35:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for backcall
Running setup.py clean for backcall
Failed to build tornado backcall
Installing collected packages: tornado, decorator, six, ipython-genutils, traitlets, python-dateutil, jupyter-core, pyzmq, jupyter-client, pickleshare, pygments, backcall, parso, jedi, wcwidth, prompt-toolkit, ptyprocess, pexpect, ipython, ipykernel
Running setup.py install for tornado ... error
Complete output from command /Documents/Intro-to-Pandas/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-jgyop2hc/tornado/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-j9jy0w7y-record/install-record.txt --single-version-externally-managed --compile --install-headers /Documents/Intro-to-Pandas/include/site/python3.5/tornado:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/tornado
copying tornado/util.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/wsgi.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/log.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/options.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/testing.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/curl_httpclient.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/web.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/netutil.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/http1connection.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/locale.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/concurrent.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/_locale_data.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/ioloop.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/iostream.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/__init__.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/websocket.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/auth.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/httputil.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/httpserver.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/tcpserver.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/tcpclient.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/autoreload.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/process.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/httpclient.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/template.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/locks.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/queues.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/escape.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/simple_httpclient.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/routing.py -> build/lib.linux-x86_64-3.5/tornado
copying tornado/gen.py -> build/lib.linux-x86_64-3.5/tornado
creating build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/util.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/log_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/tcpserver_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/locale_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/resolve_test_helper.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/httpserver_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/import_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/util_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/escape_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/iostream_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/simple_httpclient_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/template_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/locks_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/routing_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/queues_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/__init__.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/options_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/testing_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/wsgi_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/netutil_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/runtests.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/gen_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/twisted_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/curl_httpclient_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/asyncio_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/websocket_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/__main__.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/ioloop_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/concurrent_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/tcpclient_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/windows_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/httpclient_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/process_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/auth_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/autoreload_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/httputil_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/web_test.py -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/http1connection_test.py -> build/lib.linux-x86_64-3.5/tornado/test
creating build/lib.linux-x86_64-3.5/tornado/platform
copying tornado/platform/twisted.py -> build/lib.linux-x86_64-3.5/tornado/platform
copying tornado/platform/caresresolver.py -> build/lib.linux-x86_64-3.5/tornado/platform
copying tornado/platform/interface.py -> build/lib.linux-x86_64-3.5/tornado/platform
copying tornado/platform/__init__.py -> build/lib.linux-x86_64-3.5/tornado/platform
copying tornado/platform/windows.py -> build/lib.linux-x86_64-3.5/tornado/platform
copying tornado/platform/posix.py -> build/lib.linux-x86_64-3.5/tornado/platform
copying tornado/platform/auto.py -> build/lib.linux-x86_64-3.5/tornado/platform
copying tornado/platform/asyncio.py -> build/lib.linux-x86_64-3.5/tornado/platform
copying tornado/py.typed -> build/lib.linux-x86_64-3.5/tornado
creating build/lib.linux-x86_64-3.5/tornado/test/csv_translations
copying tornado/test/csv_translations/fr_FR.csv -> build/lib.linux-x86_64-3.5/tornado/test/csv_translations
creating build/lib.linux-x86_64-3.5/tornado/test/gettext_translations
creating build/lib.linux-x86_64-3.5/tornado/test/gettext_translations/fr_FR
creating build/lib.linux-x86_64-3.5/tornado/test/gettext_translations/fr_FR/LC_MESSAGES
copying tornado/test/gettext_translations/fr_FR/LC_MESSAGES/tornado_test.mo -> build/lib.linux-x86_64-3.5/tornado/test/gettext_translations/fr_FR/LC_MESSAGES
copying tornado/test/gettext_translations/fr_FR/LC_MESSAGES/tornado_test.po -> build/lib.linux-x86_64-3.5/tornado/test/gettext_translations/fr_FR/LC_MESSAGES
copying tornado/test/options_test.cfg -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/options_test_types.cfg -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/options_test_types_str.cfg -> build/lib.linux-x86_64-3.5/tornado/test
creating build/lib.linux-x86_64-3.5/tornado/test/static
copying tornado/test/static/robots.txt -> build/lib.linux-x86_64-3.5/tornado/test/static
copying tornado/test/static/sample.xml -> build/lib.linux-x86_64-3.5/tornado/test/static
copying tornado/test/static/sample.xml.gz -> build/lib.linux-x86_64-3.5/tornado/test/static
copying tornado/test/static/sample.xml.bz2 -> build/lib.linux-x86_64-3.5/tornado/test/static
creating build/lib.linux-x86_64-3.5/tornado/test/static/dir
copying tornado/test/static/dir/index.html -> build/lib.linux-x86_64-3.5/tornado/test/static/dir
copying tornado/test/static_foo.txt -> build/lib.linux-x86_64-3.5/tornado/test
creating build/lib.linux-x86_64-3.5/tornado/test/templates
copying tornado/test/templates/utf8.html -> build/lib.linux-x86_64-3.5/tornado/test/templates
copying tornado/test/test.crt -> build/lib.linux-x86_64-3.5/tornado/test
copying tornado/test/test.key -> build/lib.linux-x86_64-3.5/tornado/test
running build_ext
building 'tornado.speedups' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/tornado
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/Documents/Intro-to-Pandas/include -I/usr/include/python3.5m -c tornado/speedups.c -o build/temp.linux-x86_64-3.5/tornado/speedups.o
tornado/speedups.c:2:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
command 'x86_64-linux-gnu-gcc' failed with exit status 1
/tmp/pip-build-jgyop2hc/tornado/setup.py:104: UserWarning:
********************************************************************
WARNING: The tornado.speedups extension module could not
be compiled. No C extensions are essential for Tornado to run,
although they do result in significant speed improvements for
websockets.
The output above this warning shows how the compilation failed.
Here are some hints for popular operating systems:
If you are seeing this message on Linux you probably need to
install GCC and/or the Python development package for your
version of Python.
Debian and Ubuntu users should issue the following command:
$ sudo apt-get install build-essential python-dev
RedHat and CentOS users should issue the following command:
$ sudo yum install gcc python-devel
Fedora users should issue the following command:
$ sudo dnf install gcc python-devel
MacOS users should run:
$ xcode-select --install
********************************************************************
"The output above "
running install_lib
creating /Documents/Intro-to-Pandas/lib/python3.5/site-packages/tornado
error: could not create '/Documents/Intro-to-Pandas/lib/python3.5/site-packages/tornado': Permission denied
----------------------------------------
Command "/Documents/Intro-to-Pandas/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-jgyop2hc/tornado/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-j9jy0w7y-record/install-record.txt --single-version-externally-managed --compile --install-headers /Documents/Intro-to-Pandas/include/site/python3.5/tornado" failed with error code 1 in /tmp/pip-build-jgyop2hc/tornado/
I know this has something to do with tornado.
sudo python3 -m pip install ipykernel
The directory '/home/main/.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/main/.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.
Collecting ipykernel
Downloading https://files.pythonhosted.org/packages/d8/b0/f0be5c5ab335196f5cce96e5b889a4fcf5bfe462eb0acc05cd7e2caf65eb/ipykernel-5.1.0-py3-none-any.whl (113kB)
100% |████████████████████████████████| 122kB 1.5MB/s
Collecting ipython>=5.0.0 (from ipykernel)
Downloading https://files.pythonhosted.org/packages/46/b5/ca080401b8dbde51a0f4377b4e22ce02b266340a1cda389b6dea702d06d1/ipython-7.4.0-py3-none-any.whl (769kB)
100% |████████████████████████████████| 778kB 1.5MB/s
Collecting tornado>=4.2 (from ipykernel)
Downloading https://files.pythonhosted.org/packages/b1/7f/8109821ff9df1bf3519169e34646705c32ac13be6a4d51a79ed57f47686e/tornado-6.0.1.tar.gz (481kB)
100% |████████████████████████████████| 491kB 1.5MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'setuptools'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-sr9q5mjc/tornado/
I know I may have to buy a new computer and maybe move to another state after installing anaconda to get this to work.
$ pip install tornado
Collecting tornado
Using cached https://files.pythonhosted.org/packages/b1/7f/8109821ff9df1bf3519169e34646705c32ac13be6a4d51a79ed57f47686e/tornado-6.0.1.tar.gz
Building wheels for collected packages: tornado
Running setup.py bdist_wheel for tornado ... error
Complete output from command /Documents/Intro-to-Pandas/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ccief454/tornado/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/tmpg_2iu1zvpip-wheel- --python-tag cp35:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for tornado
I also sudo apt install'd python-dev and buildessentials. Still did not help.
I just want to know why it's not working - for the sack of knowing.
Command "/Documents/Intro-to-Pandas/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-h1d5rcar/tornado/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-ift0i4ks-record/install-record.txt --single-version-externally-managed --compile --install-headers /Documents/Intro-to-Pandas/include/site/python3.5/tornado" failed with error code 1 in /tmp/pip-build-h1d5rcar/tornado/
(Intro-to-Pandas) main#McCarter:~/Desktop
$ sudo pip install tornado
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
ImportError: cannot import name main
(Intro-to-Pandas) main#McCarter:~/Desktop
$ sudo pip -m install tornado
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
ImportError: cannot import name main
(Intro-to-Pandas) main#McCarter:~/Desktop
I fixed my issue(s).
/* Create a python3 virtual enviroment and then using jupyter notebook.*/
$ sudo python3 -m pip install virtualenv :
$ virtualenv mypythonAMCO : //create
$ source mypython/bin/activate : //activate
$ pip install jupyter : //install jupyter
/*Whenever you would like to stop the Jupyter Notebook process, press CTRL+C, type Y when prompted, and then hit ENTER to confirm.*/
I uninstalled anaconda and followed the above, making a virtualenv python environment so as to isolate my 'coding area' in that only the files/modules and version of python I wish will run and be implemented. Making a python virtual environment is very helpful for it gives you more control. I was able to use pip with 'python3 emphasis' to install pandas and start up jupyter notebook.

pip Install error for mysql-python not working

I am trying to use the pip install mysql-python command and I get the error below. I have no idea what this means someone please help. I have already updated my verison of pip and setuptools and wheels so I am at a loss. I get a big error message but only have the first half presented below.
C:\Users\Alex\Desktop\Cornell Stuff\Computer Programs\WinPython-64bit-
3.4.3.3\python-3.4.3.amd64>pip install mysql-python
Collecting mysql-python
Downloading MySQL-python-1.2.5.zip (108kB)
100% |################################| 112kB 179kB/s
Building wheels for collected packages: mysql-python
Running setup.py bdist_wheel for mysql-python ... error
Complete output from command "C:\Users\Alex\Desktop\Cornell Stuff\Computer
Programs\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\python.exe" -u -c
"import setuptools,
tokenize;__file__='C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-build-
1kxb8j7_\\mysql-python\\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
C:\Users\Alex\AppData\Local\Temp\tmpzz01n6ylpip-wheel- --python-tag cp34:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.4
copying _mysql_exceptions.py -> build\lib.win-amd64-3.4
creating build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.4\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.4\MySQLdb
creating build\lib.win-amd64-3.4\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-
3.4\MySQLdb\constants
running build_ext
building '_mysql' extension
creating build\temp.win-amd64-3.4
creating build\temp.win-amd64-3.4\Release
C:\Users\Alex\Desktop\Cornell Stuff\Computer Programs\WinPython-64bit-
3.4.3.3\python-3.4.3.amd64\..\tools\mingw32\bin\gcc.exe -mdll -O -DMS_WIN64
-Wall -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 "-IC:\Program
Files (x86)\MySQL\MySQL Connector C 6.0.2\include" "-
IC:\Users\Alex\Desktop\Cornell Stuff\Computer Programs\WinPython-64bit-
3.4.3.3\python-3.4.3.amd64\include" "-IC:\Users\Alex\Desktop\Cornell
Stuff\Computer Programs\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\include"
-c _mysql.c -o build\temp.win-amd64-3.4\Release\_mysql.o /Zl
gcc: error: /Zl: No such file or directory
error: command 'C:\\Users\\Alex\\Desktop\\Cornell Stuff\\Computer
Programs\\WinPython-64bit-3.4.3.3\\python-
3.4.3.amd64\\..\\tools\\mingw32\\bin\\gcc.exe' failed with exit status 1
----------------------------------------
Failed building wheel for mysql-python
Running setup.py clean for mysql-python
Failed to build mysql-python
it's written there that mysql-python may not be python-3 compatible : https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
you may rather try, for example: "pip install mysql-connector-python"

Having issues when install mitmproxy through pip

I am having following issue when installing mitmproxy through pip.
I have tried other fixed related to egg error. Here on stack overflow.
Can't install via pip because of egg_info error
pip install matplotlib fails: 'cannot build package freetype; "python setup.py egg_info" failed with error code 1'
104:bin user129856$ sudo pip install mitmproxy
The directory '/Users/alokchoudhary/Library/Caches/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 '/Users/alokchoudhary/Library/Caches/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.
Collecting mitmproxy
/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading mitmproxy-0.12.1.tar.gz (6.5MB)
100% |████████████████████████████████| 6.5MB 18kB/s
Collecting pyperclip>=1.5.8 (from mitmproxy)
Downloading pyperclip-1.5.11.zip
Collecting pyasn1>0.1.2 (from mitmproxy)
Downloading pyasn1-0.1.8.tar.gz (75kB)
100% |████████████████████████████████| 77kB 827kB/s
Collecting tornado>=4.0.2 (from mitmproxy)
Downloading tornado-4.2.tar.gz (433kB)
100% |████████████████████████████████| 434kB 260kB/s
Collecting lxml>=3.3.6 (from mitmproxy)
Downloading lxml-3.4.4.tar.gz (3.5MB)
100% |████████████████████████████████| 3.5MB 32kB/s
Collecting netlib<0.13,>=0.12 (from mitmproxy)
Downloading netlib-0.12.1.tar.gz (64kB)
100% |████████████████████████████████| 65kB 729kB/s
Complete output from command python setup.py egg_info:
warning: no files found matching 'OpenSSL/RATIONALE'
warning: no previously-included files found matching 'leakcheck'
warning: no previously-included files matching '*.py' found under directory 'leakcheck'
warning: no previously-included files matching '*.pem' found under directory 'leakcheck'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
no previously-included directories found matching 'doc/_build'
zip_safe flag not set; analyzing archive contents...
Installed /private/tmp/pip-build-wOHXdq/netlib/.eggs/pyOpenSSL-0.15.1-py2.7.egg
Searching for cffi
Reading https://pypi.python.org/simple/cffi/
Best match: cffi 1.1.2
Downloading https://pypi.python.org/packages/source/c/cffi/cffi-1.1.2.tar.gz#md5=ca6e6c45b45caa87aee9adc7c796eaea
Processing cffi-1.1.2.tar.gz
Writing /tmp/easy_install-_e2qwn/cffi-1.1.2/setup.cfg
Running cffi-1.1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-_e2qwn/cffi-1.1.2/egg-dist-tmp-382ExN
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
#include <ffi.h>
^
1 error generated.
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/private/tmp/pip-build-wOHXdq/netlib/setup.py", line 87, in <module>
"install": CFFIInstall,
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "build/bdist.macosx-10.10-intel/egg/setuptools/dist.py", line 268, in __init__
File "build/bdist.macosx-10.10-intel/egg/setuptools/dist.py", line 313, in fetch_build_eggs
File "build/bdist.macosx-10.10-intel/egg/pkg_resources/__init__.py", line 836, in resolve
File "build/bdist.macosx-10.10-intel/egg/pkg_resources/__init__.py", line 1081, in best_match
File "build/bdist.macosx-10.10-intel/egg/pkg_resources/__init__.py", line 1093, in obtain
File "build/bdist.macosx-10.10-intel/egg/setuptools/dist.py", line 380, in fetch_build_egg
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 629, in easy_install
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 659, in install_item
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 842, in install_eggs
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 1070, in build_and_install
File "build/bdist.macosx-10.10-intel/egg/setuptools/command/easy_install.py", line 1058, in run_setup
distutils.errors.DistutilsError: Setup script exited with error: command 'cc' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-wOHXdq/netlib
Updated after first response for libffi:
After Installing libffi, it started breaking on libxml. I found the lxml on pip.
and its break again and looking for libxml :(
104:~ user2368563$ brew install libxml
Error: No available formula for libxml
Searching formulae...
libxml++ libxml2 libxmlsec1
Searching taps...
homebrew/versions/libxml278
104:~ user2368563$ brew install libxml2
Warning: libxml2-2.9.2 already installed
104:bin user2368563$ sudo pip install lxml
The directory '/Users/alokchoudhary/Library/Caches/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 '/Users/alokchoudhary/Library/Caches/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.
Collecting lxml
/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading lxml-3.4.4.tar.gz (3.5MB)
100% |████████████████████████████████| 3.5MB 116kB/s
Installing collected packages: lxml
Running setup.py install for lxml
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-bDtXaT/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gmvCN9-record/install-record.txt --single-version-externally-managed --compile:
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.4.
Building without Cython.
Using build configuration of libxslt 1.1.28
running install
running build
running build_py
creating build
creating build/lib.macosx-10.10-intel-2.7
creating build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/__init__.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/_elementpath.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/builder.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/cssselect.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/ElementInclude.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/sax.py -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/usedoctest.py -> build/lib.macosx-10.10-intel-2.7/lxml
creating build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.macosx-10.10-intel-2.7/lxml/includes
creating build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/__init__.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.10-intel-2.7/lxml/html
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron
copying src/lxml/lxml.etree.h -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.macosx-10.10-intel-2.7/lxml
copying src/lxml/includes/c14n.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.macosx-10.10-intel-2.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.macosx-10.10-intel-2.7/lxml/includes
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/rng
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl
creating build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-10.10-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-10.10-intel-2.7
creating build/temp.macosx-10.10-intel-2.7/src
creating build/temp.macosx-10.10-intel-2.7/src/lxml
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/usr/include/libxml2 -I/private/tmp/pip-build-bDtXaT/lxml/src/lxml/includes -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.10-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace
In file included from src/lxml/lxml.etree.c:239:
/private/tmp/pip-build-bDtXaT/lxml/src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found
#include "libxml/xmlversion.h"
^
1 error generated.
error: command 'cc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-bDtXaT/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gmvCN9-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-bDtXaT/lxml
If you read through your log carefully you might spot this line:
c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
The "fatal error" part is especially important. :)
This means that the ffi headers couldn't be located by your compiler. I'm not sure how to do it since I'm not a Mac user but maybe homebrew could help you, or Google. To me it seems like you should install homebrew and then just run:
brew install libffi
Then try pip again.
Edit
The full list of dependencies are:
python
libffi
libssl
libxml2
libxslt1
So you'll need all those, and their headers, if you want to continue down this path.
An easier solution is to download pre-built binaries for your Mac, from mitmproxy.org (OSX Mountain Lion and later). I found this info in the installation docs.

Categories