how to download Flask-MySQLdb - pip

I'm currently downloading Flask -MySQLdb to work on a log-in system project as a beginner, but when I tried to install it, it kept giving me this error, which I had no idea how to solve it.
Collecting Flask-MySQLdb
Using cached Flask-MySQLdb-0.2.0.tar.gz (2.1 kB)
Requirement already satisfied: Flask>=0.10 in c:\users\고명수\pycharmprojects\myeongsoopython\venv\lib\site-packages (from Flask-MySQLdb) (1.1.2)
Collecting mysqlclient
Using cached mysqlclient-2.0.1.tar.gz (87 kB)
Requirement already satisfied: itsdangerous>=0.24 in c:\users\고명수\pycharmprojects\myeongsoopython\venv\lib\site-packages (from Flask>=0.10->Flask-MySQLdb) (1.1.0)
Requirement already satisfied: Werkzeug>=0.15 in c:\users\고명수\pycharmprojects\myeongsoopython\venv\lib\site-packages (from Flask>=0.10->Flask-MySQLdb) (1.0.1)
Requirement already satisfied: click>=5.1 in c:\users\고명수\pycharmprojects\myeongsoopython\venv\lib\site-packages (from Flask>=0.10->Flask-MySQLdb) (7.1.2)
Requirement already satisfied: Jinja2>=2.10.1 in c:\users\고명수\pycharmprojects\myeongsoopython\venv\lib\site-packages (from Flask>=0.10->Flask-MySQLdb) (2.11.2)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\고명수\pycharmprojects\myeongsoopython\venv\lib\site-packages (from Jinja2>=2.10.1->Flask>=0.10->Flask-MySQLdb) (1.1.1)
Using legacy setup.py install for Flask-MySQLdb, since package 'wheel' is not installed.
Using legacy setup.py install for mysqlclient, since package 'wheel' is not installed.
Installing collected packages: mysqlclient, Flask-MySQLdb
Running setup.py install for mysqlclient: started
Running setup.py install for mysqlclient: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Users\고명수\PycharmProjects\MyeongsooPython\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\고명수\\AppData\\Local\\Temp\\pycharm-packaging\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\고명수\\AppData\\Local\\Temp\\pycharm-packaging\\mysqlclient\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\고명수\AppData\Local\Temp\pip-record-_h_9brc2\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\고명수\PycharmProjects\MyeongsooPython\venv\include\site\python3.8\mysqlclient'
cwd: C:\Users\고명수\AppData\Local\Temp\pycharm-packaging\mysqlclient\
Complete output (25 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.8
creating build\lib.win32-3.8\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win32-3.8\MySQLdb
copying MySQLdb\_exceptions.py -> build\lib.win32-3.8\MySQLdb
copying MySQLdb\connections.py -> build\lib.win32-3.8\MySQLdb
copying MySQLdb\converters.py -> build\lib.win32-3.8\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win32-3.8\MySQLdb
copying MySQLdb\release.py -> build\lib.win32-3.8\MySQLdb
copying MySQLdb\times.py -> build\lib.win32-3.8\MySQLdb
creating build\lib.win32-3.8\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win32-3.8\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.8\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win32-3.8\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win32-3.8\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.8\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.8\MySQLdb\constants
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'MySQLdb._mysql' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\고명수\PycharmProjects\MyeongsooPython\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\고명수\\AppData\\Local\\Temp\\pycharm-packaging\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\고명수\\AppData\\Local\\Temp\\pycharm-packaging\\mysqlclient\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\고명수\AppData\Local\Temp\pip-record-_h_9brc2\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\고명수\PycharmProjects\MyeongsooPython\venv\include\site\python3.8\mysqlclient' Check the logs for full command output.
WARNING: You are using pip version 20.1.1; however, version 20.2.2 is available.
You should consider upgrading via the 'C:\Users\고명수\PycharmProjects\MyeongsooPython\venv\Scripts\python.exe -m pip install --upgrade pip' command.
Well, the message suggested upgrading pip to the latest version, so I tried it but it is giving me this error again.

Related

failed to build image on macos M1: gcc: error: missing argument to ‘-march=’

when building image on macos with M1, i got an error below:
Collecting python-Levenshtein==0.12.2
Using cached python-Levenshtein-0.12.2.tar.gz (50 kB)
Requirement already satisfied: setuptools in /usr/local/lib/python3.6/site-packages (from python-Levenshtein==0.12.2) (33.1.1)
Using legacy 'setup.py install' for python-Levenshtein, since package 'wheel' is not installed.
Installing collected packages: python-Levenshtein
Running setup.py install for python-Levenshtein ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-z9yhh5ds/python-levenshtein_e99c5f8b2a70415d998d3534a8b15e14/setup.py'"'"'; __file__='"'"'/tmp/pip-install-z9yhh5ds/python-levenshtein_e99c5f8b2a70415d998d3534a8b15e14/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-60fgubma/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/python-Levenshtein
cwd: /tmp/pip-install-z9yhh5ds/python-levenshtein_e99c5f8b2a70415d998d3534a8b15e14/
Complete output (31 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/Levenshtein
copying Levenshtein/StringMatcher.py -> build/lib.linux-x86_64-3.6/Levenshtein
copying Levenshtein/__init__.py -> build/lib.linux-x86_64-3.6/Levenshtein
running egg_info
writing python_Levenshtein.egg-info/PKG-INFO
writing dependency_links to python_Levenshtein.egg-info/dependency_links.txt
writing entry points to python_Levenshtein.egg-info/entry_points.txt
writing namespace_packages to python_Levenshtein.egg-info/namespace_packages.txt
writing requirements to python_Levenshtein.egg-info/requires.txt
writing top-level names to python_Levenshtein.egg-info/top_level.txt
reading manifest file 'python_Levenshtein.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*so' found anywhere in distribution
warning: no previously-included files matching '.project' found anywhere in distribution
warning: no previously-included files matching '.pydevproject' found anywhere in distribution
writing manifest file 'python_Levenshtein.egg-info/SOURCES.txt'
copying Levenshtein/_levenshtein.c -> build/lib.linux-x86_64-3.6/Levenshtein
copying Levenshtein/_levenshtein.h -> build/lib.linux-x86_64-3.6/Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/Levenshtein
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python3.6m -c Levenshtein/_levenshtein.c -o build/temp.linux-x86_64-3.6/Levenshtein/_levenshtein.o
gcc: error: missing argument to ‘-march=’
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-z9yhh5ds/python-levenshtein_e99c5f8b2a70415d998d3534a8b15e14/setup.py'"'"'; __file__='"'"'/tmp/pip-install-z9yhh5ds/python-levenshtein_e99c5f8b2a70415d998d3534a8b15e14/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-60fgubma/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/python-Levenshtein Check the logs for full command output.
My Dockerfile is :
FROM ***:21.06.22.1038
# install related packages
COPY target/requirements.txt /root/requirements.txt
RUN pip3 install -r /root/requirements.txt -i https://pypi.douban.com/simple/
And my requirements.txt is:
pymysql
requests==2.21.0
xlrd==1.2.0
tornado==5.1.1
pypinyin==0.35.3
python-Levenshtein==0.12.2
thrift==0.13.0
jieba==0.42.1
Cython==0.28.5
elasticsearch==7.13.1
scikit-learn==0.18.2
ConcurrentLogHandler==0.9.1
tormysql==0.4.2
truepy==2.0.4
redis==3.0.1
redis-py-cluster==2.0.0
The version of my base image is python3.6.8, and if i delete python-Levenshtein==0.12.2 from requirements.txt, it will success.
i`ve already installed:
wget aclocal automake autoconf make gcc gcc-c++ python3-devel mysql-devel bzip2 libffi-devel openssl-devel epel-release python3-pip python3-setuptools python3-libs
in my base image.

Errors in downloading the python modules using pip

often I face the same error during downloading the python modules using pip. Could you guys help me sort this out? FYI I am using python 3.7v.
C:\>pip install PyAudio
Collecting PyAudio
Downloading 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 c:\users\avinash.tripathy\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\AVINAS~1.TRI\\AppData\\Local\\Temp\\pip-install-_qfc03y7\\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 C:\Users\AVINAS~1.TRI\AppData\Local\Temp\pip-wheel-fjb2zkz4 --python-tag cp37:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.7
copying src\pyaudio.py -> build\lib.win32-3.7
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
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 c:\users\avinash.tripathy\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\AVINAS~1.TRI\\AppData\\Local\\Temp\\pip-install-_qfc03y7\\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 C:\Users\AVINAS~1.TRI\AppData\Local\Temp\pip-record-h2e_hkyb\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
copying src\pyaudio.py -> build\lib.win32-3.7
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
Command "c:\users\avinash.tripathy\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\AVINAS~1.TRI\\AppData\\Local\\Temp\\pip-install-_qfc03y7\\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 C:\Users\AVINAS~1.TRI\AppData\Local\Temp\pip-record-h2e_hkyb\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\AVINAS~1.TRI\AppData\Local\Temp\pip-install-_qfc03y7\PyAudio\
It doesn't look like PyAudio has a binary package available under pip. Christoph Gohlke maintains Unofficial Windows Binaries for Python Extension Packages and it has PyAudio. Download an appropriate version, then install it directly with pip install.

Error when installing secp256k1 library on windows

I am trying to install the secp256k1 library on my windows 10 64-bit machine and I receive the following error
C:\Users\user\Downloads\http-ftp>pip3 install secp256k1
Collecting secp256k1
Using cached https://files.pythonhosted.org/packages/52/62/d7bf3829e126e517e253d2e22a63511c54bbaac34d7ddea316cde040fc49/secp256k1-0.13.2.tar.gz
Requirement already satisfied: cffi>=1.3.0 in c:\users\user\appdata\local\programs\python\python36\lib\site-packages (from secp256k1) (1.11.5)
Requirement already satisfied: pycparser in c:\users\user\appdata\local\programs\python\python36\lib\site-packages (from cffi>=1.3.0->secp256k1) (2.18)
Building wheels for collected packages: secp256k1
Running setup.py bdist_wheel for secp256k1 ... error
Complete output from command c:\users\user\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-ewfjmjoy\\secp256k1\\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\user\AppData\Local\Temp\pip-wheel-p9ijp41o --python-tag cp36:
0.28
Using bundled libsecp256k1
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\secp256k1
copying secp256k1\__init__.py -> build\lib.win-amd64-3.6\secp256k1
copying secp256k1\__main__.py -> build\lib.win-amd64-3.6\secp256k1
running build_clib
error: [WinError 193] %1 is not a valid Win32 application
----------------------------------------
Failed building wheel for secp256k1
Running setup.py clean for secp256k1
Failed to build secp256k1
Installing collected packages: secp256k1
Running setup.py install for secp256k1 ... error
Complete output from command c:\users\user\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-ewfjmjoy\\secp256k1\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\user\AppData\Local\Temp\pip-record-y6bxnsr0\install-record.txt --single-version-externally-managed --compile:
0.28
Using bundled libsecp256k1
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\secp256k1
copying secp256k1\__init__.py -> build\lib.win-amd64-3.6\secp256k1
copying secp256k1\__main__.py -> build\lib.win-amd64-3.6\secp256k1
running build_clib
error: [WinError 193] %1 is not a valid Win32 application
----------------------------------------
Command "c:\users\user\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-ewfjmjoy\\secp256k1\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\user\AppData\Local\Temp\pip-record-y6bxnsr0\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\user\AppData\Local\Temp\pip-install-ewfjmjoy\secp256k1\
Any suggestions what can be wrong and how to correct it? I tried with pip3 and easy_install also but nothing seems to work.
You can use this one: https://github.com/jhtitor/secp256k1prp-py
from the repository README:
Windows 7+
install .NET Framework 4.6 or higher
install Visual C++ 14.0 from "Microsoft Visual C++ Build Tools"
install python 3.6.5 or later
Note: for python 3.5 builds, download and install Visual Studio 2015
Then try to install it again
Windows is not supported: https://github.com/hyperledger/sawtooth-sdk-python/blob/master/BUILD.md
"Supported operating systems: Ubuntu 18.04 and macOS
If you want to use a Windows system, we recommend that you install Ubuntu 18.04 in a virtual machine manager, such as Hyper-V or VirtualBox, and develop from the guest operating system."
I had the same problem in Ubuntu and I solved it with this solution:
sudo apt-get install libsecp256k1-dev
Source
You might want to use this lib
https://pypi.org/project/secp256k1Crypto/
pip3 install secp256k1Crypto
it's a fork of secp256k1-py (with the exact functionality) but with precompiled libraries from electrumsv-secp256k1 which supports Windows with easy installation.

Installing spaCy on wind 10 not working

I have Python 3.6.5 and I am trying to install spaCy via pip which is throwing me the below error when it tries to compile murmurhash.mrmr extension:
C:\Users\muthu>pip install C:\Users\muthu\Downloads\Installers\en_core_web_sm-2.0.0.tar.gz --no-cache-dir
Processing c:\users\muthu\downloads\installers\en_core_web_sm-2.0.0.tar.gz
Collecting spacy>=2.0.0a18 (from en-core-web-sm==2.0.0)
Downloading spacy-2.0.11.tar.gz (17.6MB)
100% |████████████████████████████████| 17.6MB 1.2MB/s
Requirement already satisfied: numpy>=1.7 in c:\users\muthu\appdata\local\programs\python\python36-32\lib\site-packages (from spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Collecting murmurhash<0.29,>=0.28 (from spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading murmurhash-0.28.0.tar.gz
Collecting cymem<1.32,>=1.30 (from spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading cymem-1.31.2.tar.gz
Collecting preshed<2.0.0,>=1.0.0 (from spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading preshed-1.0.0.tar.gz (89kB)
100% |████████████████████████████████| 92kB 1.0MB/s
Collecting thinc<6.11.0,>=6.10.1 (from spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading thinc-6.10.2.tar.gz (1.2MB)
100% |████████████████████████████████| 1.2MB 786kB/s
Collecting plac<1.0.0,>=0.9.6 (from spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading plac-0.9.6-py2.py3-none-any.whl
Collecting pathlib (from spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading pathlib-1.0.1.tar.gz (49kB)
100% |████████████████████████████████| 51kB 629kB/s
Collecting ujson>=1.35 (from spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading ujson-1.35.tar.gz (192kB)
100% |████████████████████████████████| 194kB 695kB/s
Collecting dill<0.3,>=0.2 (from spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading dill-0.2.7.1.tar.gz (64kB)
100% |████████████████████████████████| 71kB 950kB/s
Collecting regex==2017.4.5 (from spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading regex-2017.04.05-cp36-none-win32.whl (237kB)
100% |████████████████████████████████| 245kB 910kB/s
Requirement already satisfied: wrapt in c:\users\muthu\appdata\local\programs\python\python36-32\lib\site-packages (from thinc<6.11.0,>=6.10.1->spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Collecting tqdm<5.0.0,>=4.10.0 (from thinc<6.11.0,>=6.10.1->spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading tqdm-4.21.0-py2.py3-none-any.whl (42kB)
100% |████████████████████████████████| 51kB 893kB/s
Collecting cytoolz<0.9,>=0.8 (from thinc<6.11.0,>=6.10.1->spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading cytoolz-0.8.2.tar.gz (386kB)
100% |████████████████████████████████| 389kB 741kB/s
Requirement already satisfied: six<2.0.0,>=1.10.0 in c:\users\muthu\appdata\local\programs\python\python36-32\lib\site-packages (from thinc<6.11.0,>=6.10.1->spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Collecting termcolor (from thinc<6.11.0,>=6.10.1->spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading termcolor-1.1.0.tar.gz
Collecting msgpack-python (from thinc<6.11.0,>=6.10.1->spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading msgpack-python-0.5.6.tar.gz (138kB)
100% |████████████████████████████████| 143kB 774kB/s
Collecting msgpack-numpy==0.4.1 (from thinc<6.11.0,>=6.10.1->spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading msgpack_numpy-0.4.1-py2.py3-none-any.whl
Collecting pyreadline>=1.7.1 (from dill<0.3,>=0.2->spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading pyreadline-2.1.zip (109kB)
100% |████████████████████████████████| 112kB 768kB/s
Collecting toolz>=0.8.0 (from cytoolz<0.9,>=0.8->thinc<6.11.0,>=6.10.1->spacy>=2.0.0a18->en-core-web-sm==2.0.0)
Downloading toolz-0.9.0.tar.gz (45kB)
100% |████████████████████████████████| 51kB 1.2MB/s
Installing collected packages: murmurhash, cymem, preshed, tqdm, toolz, cytoolz, plac, pyreadline, dill, termcolor, pathlib, msgpack-python, msgpack-numpy, thinc, ujson, regex, spacy, en-core-web-sm
Running setup.py install for murmurhash ... error
Complete output from command c:\users\muthu\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\muthu\\AppData\\Local\\Temp\\pip-build-biubjhck\\murmurhash\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\muthu\AppData\Local\Temp\pip-tvo0bjqa-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\murmurhash
copying murmurhash\about.py -> build\lib.win32-3.6\murmurhash
copying murmurhash\__init__.py -> build\lib.win32-3.6\murmurhash
creating build\lib.win32-3.6\murmurhash\tests
copying murmurhash\tests\test_import.py -> build\lib.win32-3.6\murmurhash\tests
copying murmurhash\tests\__init__.py -> build\lib.win32-3.6\murmurhash\tests
copying murmurhash\mrmr.pyx -> build\lib.win32-3.6\murmurhash
copying murmurhash\mrmr.pxd -> build\lib.win32-3.6\murmurhash
copying murmurhash\__init__.pxd -> build\lib.win32-3.6\murmurhash
creating build\lib.win32-3.6\murmurhash\include
creating build\lib.win32-3.6\murmurhash\include\murmurhash
copying murmurhash\include\murmurhash\MurmurHash2.h -> build\lib.win32-3.6\murmurhash\include\murmurhash
copying murmurhash\include\murmurhash\MurmurHash3.h -> build\lib.win32-3.6\murmurhash\include\murmurhash
running build_ext
building 'murmurhash.mrmr' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
----------------------------------------
Command "c:\users\muthu\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\muthu\\AppData\\Local\\Temp\\pip-build-biubjhck\\murmurhash\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\muthu\AppData\Local\Temp\pip-tvo0bjqa-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\muthu\AppData\Local\Temp\pip-build-biubjhck\murmurhash\
I then installed "Microsoft Visual C++ Build Tools" from http://landinghub.visualstudio.com/visual-cpp-build-tools (eventhough I had VS2012!!!) and that installation went fine!
Opened new command prompt and retried the pip, gave the path to the vs installed path and retried and so and so forth. Every time its giving me the same error. Not sure what am I missing here :(
Any help is appreciated.
If you're stuck and can't get it to compile, you can find pre-compiled wheel installers for all of the relevant libraries here: https://www.lfd.uci.edu/~gohlke/pythonlibs/
You can download the file, and then do pip install path/to/file.whl, and it should work.
You could also try using conda, and then installing from the conda-forge channel.
I spent a day trying to fix it recently. My solution was to install Visual Studio 2015 with Update 3 (make sure that Microsoft Visual C++ 2015 Redistributable (x86) - 14.... is installed,it doesn't matter if you have older versions but if you already have Microsoft Visual C++ 2017, then that will stop you from installing C++ 2015).
When you install VS2015, in the Features tab, make sure you tick the box for Windows and Web development so this is installed as well (Spacy installation
won't work without it)
After installation, run your command prompt (I use Anaconda Prompt) as Administrator and proceed to run "pip install -U spacy".
FYI, I used Anaconda Prompt, Window 10, Python 3.6.2 and I installed Spacy on an Anaconda virtenv. Hope this would help.
Installation step

Cannot install scrapy on my Mac using easy_install or pip

I am using sudo easy_install Scrapy to try and install Scrapy on my Mac (running Mac OS 10.9.2).
The installation appears to be nearly complete when I receive the error below. I can't seem to figure it out. Can anyone help?
Installed /Library/Python/2.7/site-packages/cssselect-0.9.1-py2.7.egg
Searching for lxml
Reading http://pypi.python.org/simple/lxml/
Best match: lxml 3.3.3
Downloading https://pypi.python.org/packages/source/l/lxml/lxml-3.3.3.tar.gz#md5=f2675837b4358a5ecab5fd9a783fd0e5
Processing lxml-3.3.3.tar.gz
Running lxml-3.3.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xwN2PB/lxml-3.3.3/egg-dist-tmp-CkAsXC
Building lxml version 3.3.3.
Building without Cython.
Using build configuration of libxslt 1.1.28
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: Setup script exited with error: command 'cc' failed with exit status 1
Edit
Using pip install scrapy, I get the error below. So neither option works.
Installing collected packages: w3lib, queuelib, lxml
Running setup.py install for w3lib
error: could not create '/Library/Python/2.7/site-packages/w3lib': Permission denied
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/86/1mln902j0jx7698nxqk69_7r0000gn/T/pip_build_zacharygallinger/w3lib/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/86/1mln902j0jx7698nxqk69_7r0000gn/T/pip-hXKj0S-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/w3lib
copying w3lib/__init__.py -> build/lib/w3lib
copying w3lib/encoding.py -> build/lib/w3lib
copying w3lib/form.py -> build/lib/w3lib
copying w3lib/html.py -> build/lib/w3lib
copying w3lib/http.py -> build/lib/w3lib
copying w3lib/url.py -> build/lib/w3lib
copying w3lib/util.py -> build/lib/w3lib
running install_lib
creating /Library/Python/2.7/site-packages/w3lib
error: could not create '/Library/Python/2.7/site-packages/w3lib': Permission denied
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/86/1mln902j0jx7698nxqk69_7r0000gn/T/pip_build_zacharygallinger/w3lib/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/86/1mln902j0jx7698nxqk69_7r0000gn/T/pip-hXKj0S-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/86/1mln902j0jx7698nxqk69_7r0000gn/T/pip_build_zacharygallinger/w3lib
Storing debug log for failure in /Users/zacharygallinger/Library/Logs/pip.log
For the time being you might be able to get past this by doing the following before building it:
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
This should signal the compiler to turn these errors back into warnings. Eventually, as indicated by the error message these will be hard errors. Long term, the package maintainer will have to edit the package to not use -mno-fused-madd.
For reference: https://bitbucket.org/cffi/cffi/issue/46/unused-mno-fused-madd-clang-warnings-on-os

Resources