How to install wordcloud for python? - python

I am trying to visualise data using word cloud. However when I used pip install wordcloud, I got the following error:
D:\...>pip install wordcloud
Collecting wordcloud
Using cached wordcloud-1.8.1.tar.gz (220 kB)
Requirement already satisfied: numpy>=1.6.1 in c:\users\ameli\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from wordcloud) (1.19.5
)
Requirement already satisfied: pillow in c:\users\ameli\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from wordcloud) (8.1.0)
Requirement already satisfied: matplotlib in c:\users\ameli\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from wordcloud) (3.3.3)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\ameli\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from matplotlib
->wordcloud) (2.8.1)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\ameli\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from matplotlib->w
ordcloud) (1.3.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in c:\users\ameli\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packa
ges (from matplotlib->wordcloud) (2.4.7)
Requirement already satisfied: cycler>=0.10 in c:\users\ameli\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from matplotlib->wordcl
oud) (0.10.0)
Requirement already satisfied: six in c:\users\ameli\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from cycler>=0.10->matplotlib->w
ordcloud) (1.15.0)
Using legacy 'setup.py install' for wordcloud, since package 'wheel' is not installed.
Installing collected packages: wordcloud
Running setup.py install for wordcloud ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\ameli\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ameli\\Ap
pData\\Local\\Temp\\pip-install-i40_agzl\\wordcloud_591db346adc745a0a41bcad116c4a453\\setup.py'"'"'; __file__='"'"'C:\\Users\\ameli\\AppData\\Local\\Temp\\pip-install-i40_agzl\\wordcloud_591db346adc745a0a41bc
ad116c4a453\\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\ameli\AppData\Local\Temp\pip-record-odcy4xrk\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\ameli\AppData\Local\Packages\PythonSoftwareFo
undation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\wordcloud'
cwd: C:\Users\ameli\AppData\Local\Temp\pip-install-i40_agzl\wordcloud_591db346adc745a0a41bcad116c4a453\
Complete output (20 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\wordcloud
copying wordcloud\color_from_image.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\tokenization.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\_version.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\__init__.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\__main__.py -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\stopwords -> build\lib.win-amd64-3.9\wordcloud
copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-3.9\wordcloud
UPDATING build\lib.win-amd64-3.9\wordcloud/_version.py
set build\lib.win-amd64-3.9\wordcloud/_version.py to '1.8.1'
running build_ext
building 'wordcloud.query_integral_image' 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\ameli\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.ar
gv[0] = '"'"'C:\\Users\\ameli\\AppData\\Local\\Temp\\pip-install-i40_agzl\\wordcloud_591db346adc745a0a41bcad116c4a453\\setup.py'"'"'; __file__='"'"'C:\\Users\\ameli\\AppData\\Local\\Temp\\pip-install-i40_agzl
\\wordcloud_591db346adc745a0a41bcad116c4a453\\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\ameli\AppData\Local\Temp\pip-record-odcy4xrk\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\ameli\AppDat
a\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\wordcloud' Check the logs for full command output.

Wordcloud is not a pure Python project as it has some C code. C code needs to be built for different operating systems and Python versions.
Normally when you run pip install wordcloud, pip tries to find a built package (aka wheel) for your OS and Python but if it can't find, it downloads the source code and tries to build (compile) it.
But this process obviously requires a C compiler which is not supposed to be in a Python developer's system.
I built the package for several configurations and made them public.
You can directly install from there.
For example if you use Windows and Python 3.10, run pip install https://github.com/sulunemre/word_cloud/releases/download/2/wordcloud-0.post1+gd8241b5-cp310-cp310-win_amd64.whl

As mentioned in comments, downloading the build tools from this link and running the .exe file solved the problem.

Installing wordcloud for python
Wordcloud installation throws error if not satified any of these steps:
Installing the dependencies of wordcloud : matplotlib, pillow, numpy, pandas
Checking for version of Python used
Checking for version of operating system
Checking for version of wordcloud satisfying the version of Python and operating system used
Missing to check version of wordcloud satisfying the version of python and operating system used doesn't help building wheel for installing wordcloud.
Current latest version of wordcloud is 1.8.1
Installing wordcloud:
pip install wordcloud==1.8.1
The code is tested against Python 2.7, 3.4, 3.5, 3.6 and 3.7.

Related

Unable to install proxybroker in PIP

I am trying to install proxybroker using PIP on Python 3.9.1, but I am getting the the following error, when I entered pip install proxybroker:-
Collecting proxybroker
Using cached proxybroker-0.3.2-py3-none-any.whl (1.6 MB)
Requirement already satisfied: aiohttp>=3.5.4 in c:\users\jshs\appdata\local\programs\python\python39\lib\site-packages (from proxybroker) (3.7.3)
Requirement already satisfied: attrs==19.1.0 in c:\users\jshs\appdata\local\programs\python\python39\lib\site-packages (from proxybroker) (19.1.0)
Requirement already satisfied: maxminddb>=1.4.1 in c:\users\jshs\appdata\local\programs\python\python39\lib\site-packages (from proxybroker) (2.0.3)
Collecting aiodns>=2.0.0
Using cached aiodns-2.0.0-py2.py3-none-any.whl (4.8 kB)
Collecting pycares>=3.0.0
Using cached pycares-3.1.1.tar.gz (233 kB)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\jshs\appdata\local\programs\python\python39\lib\site-packages (from aiohttp>=3.5.4->proxybroker) (5.1.0)
Requirement already satisfied: chardet<4.0,>=2.0 in c:\users\jshs\appdata\local\programs\python\python39\lib\site-packages (from aiohttp>=3.5.4->proxybroker) (3.0.4)
Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\jshs\appdata\local\programs\python\python39\lib\site-packages (from aiohttp>=3.5.4->proxybroker) (1.6.3)
Requirement already satisfied: async-timeout<4.0,>=3.0 in c:\users\jshs\appdata\local\programs\python\python39\lib\site-packages (from aiohttp>=3.5.4->proxybroker) (3.0.1)
Requirement already satisfied: typing-extensions>=3.6.5 in c:\users\jshs\appdata\local\programs\python\python39\lib\site-packages (from aiohttp>=3.5.4->proxybroker) (3.7.4.3)
Requirement already satisfied: cffi>=1.5.0 in c:\users\jshs\appdata\local\programs\python\python39\lib\site-packages (from pycares>=3.0.0->aiodns>=2.0.0->proxybroker) (1.14.5)
Requirement already satisfied: pycparser in c:\users\jshs\appdata\local\programs\python\python39\lib\site-packages (from cffi>=1.5.0->pycares>=3.0.0->aiodns>=2.0.0->proxybroker) (2.20)
Requirement already satisfied: idna>=2.0 in c:\users\jshs\appdata\local\programs\python\python39\lib\site-packages (from yarl<2.0,>=1.0->aiohttp>=3.5.4->proxybroker) (2.10)
Using legacy 'setup.py install' for pycares, since package 'wheel' is not installed.
Installing collected packages: pycares, aiodns, proxybroker
Running setup.py install for pycares ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\jshs\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\JSHS\\AppData\\Local\\Temp\\pip-install-kpsxgm2p\\pycares_9e37196811bb4121bae779a1fb0ccf7f\\setup.py'"'"'; __file__='"'"'C:\\Users\\JSHS\\AppData\\Local\\Temp\\pip-install-kpsxgm2p\\pycares_9e37196811bb4121bae779a1fb0ccf7f\\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\JSHS\AppData\Local\Temp\pip-record-c7u1qn2z\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jshs\appdata\local\programs\python\python39\Include\pycares'
cwd: C:\Users\JSHS\AppData\Local\Temp\pip-install-kpsxgm2p\pycares_9e37196811bb4121bae779a1fb0ccf7f\
Complete output (26 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\pycares
copying src\pycares\errno.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\utils.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\_version.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\__init__.py -> build\lib.win-amd64-3.9\pycares
copying src\pycares\__main__.py -> build\lib.win-amd64-3.9\pycares
running build_ext
generating cffi module 'build\\temp.win-amd64-3.9\\Release\\_cares.c'
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
building '_cares' extension
creating build\temp.win-amd64-3.9\Release\build
creating build\temp.win-amd64-3.9\Release\build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release\build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\deps
creating build\temp.win-amd64-3.9\Release\deps\c-ares
creating build\temp.win-amd64-3.9\Release\deps\c-ares\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DCARES_PULL_WS2TCPIP_H=1 -Ic:\users\jshs\appdata\local\programs\python\python39\include -Ic:\users\jshs\appdata\local\programs\python\python39\include -Ideps\c-ares\src -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include /Tcbuild\temp.win-amd64-3.9\Release\_cares.c /Fobuild\temp.win-amd64-3.9\Release\build\temp.win-amd64-3.9\Release\_cares.obj
_cares.c
c:\users\jshs\appdata\local\programs\python\python39\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\jshs\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\JSHS\\AppData\\Local\\Temp\\pip-install-kpsxgm2p\\pycares_9e37196811bb4121bae779a1fb0ccf7f\\setup.py'"'"'; __file__='"'"'C:\\Users\\JSHS\\AppData\\Local\\Temp\\pip-install-kpsxgm2p\\pycares_9e37196811bb4121bae779a1fb0ccf7f\\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\JSHS\AppData\Local\Temp\pip-record-c7u1qn2z\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jshs\appdata\local\programs\python\python39\Include\pycares' Check the logs for full command output.
It says that Microsoft build tools are missing, so I installed that too, but still not working!
Please help if possible!
have you tried to downgrade the python version?
I suspect it is because of the version that you are using.
From this link, it seems that it is compatible to python 3.5 or 3.6.
https://pypi.org/project/proxybroker/

Can't install Ball module

I am having a lot of trouble installing the Ball module, im running latest version of pip, python and im on windows 10. here is the error:
pip install ball
`Collecting ball
Using cached Ball-0.2.9.tar.gz (348 kB)
Requirement already satisfied: numpy in c:\users\davis\appdata\local\programs\python\python39\lib\site-packages (from ball) (1.19.5)
Requirement already satisfied: scikit-learn in c:\users\davis\appdata\local\programs\python\python39\lib\site-packages (from ball) (0.24.0)
Requirement already satisfied: pygam in c:\users\davis\appdata\local\programs\python\python39\lib\site-packages (from ball) (0.8.0)
Requirement already satisfied: progressbar2 in c:\users\davis\appdata\local\programs\python\python39\lib\site-packages (from pygam->ball) (3.53.1)
Requirement already satisfied: scipy in c:\users\davis\appdata\local\programs\python\python39\lib\site-packages (from pygam->ball) (1.6.0)
Requirement already satisfied: future in c:\users\davis\appdata\local\programs\python\python39\lib\site-packages (from pygam->ball) (0.18.2)
Requirement already satisfied: six in c:\users\davis\appdata\local\programs\python\python39\lib\site-packages (from progressbar2->pygam->ball) (1.15.0)
Requirement already satisfied: python-utils>=2.3.0 in c:\users\davis\appdata\local\programs\python\python39\lib\site-packages (from progressbar2->pygam->ball) (2.4.0)
Requirement already satisfied: joblib>=0.11 in c:\users\davis\appdata\local\programs\python\python39\lib\site-packages (from scikit-learn->ball) (1.0.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\davis\appdata\local\programs\python\python39\lib\site-packages (from scikit-learn->ball) (2.1.0)
Using legacy 'setup.py install' for ball, since package 'wheel' is not installed.
Installing collected packages: ball
Running setup.py install for ball ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\davis\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Davis\\AppData\\Local\\Temp\\pip-install-0abie82x\\ball_2fc4c2cf6ca545768116429af36f95b5\\setup.py'"'"'; __file__='"'"'C:\\Users\\Davis\\AppData\\Local\\Temp\\pip-install-0abie82x\\ball_2fc4c2cf6ca545768116429af36f95b5\\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\Davis\AppData\Local\Temp\pip-record-ly4riu7c\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\davis\appdata\local\programs\python\python39\Include\ball'
cwd: C:\Users\Davis\AppData\Local\Temp\pip-install-0abie82x\ball_2fc4c2cf6ca545768116429af36f95b5\
Complete output (18 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\Ball
copying Ball\bcorsis.py -> build\lib.win-amd64-3.9\Ball
copying Ball\bcov.py -> build\lib.win-amd64-3.9\Ball
copying Ball\bd.py -> build\lib.win-amd64-3.9\Ball
copying Ball\cball.py -> build\lib.win-amd64-3.9\Ball
copying Ball\utilize.py -> build\lib.win-amd64-3.9\Ball
copying Ball\wrap_c.py -> build\lib.win-amd64-3.9\Ball
copying Ball\__init__.py -> build\lib.win-amd64-3.9\Ball
running build_ext
building 'Ball._cball' extension
swigging src/cball.i to src/cball_wrap.c
swig.exe -python -o src/cball_wrap.c src/cball.i
error: command 'swig.exe' failed: None
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\davis\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Davis\\AppData\\Local\\Temp\\pip-install-0abie82x\\ball_2fc4c2cf6ca545768116429af36f95b5\\setup.py'"'"'; __file__='"'"'C:\\Users\\Davis\\AppData\\Local\\Temp\\pip-install-0abie82x\\ball_2fc4c2cf6ca545768116429af36f95b5\\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\Davis\AppData\Local\Temp\pip-record-ly4riu7c\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\davis\appdata\local\programs\python\python39\Include\ball' Check the logs for full command output.`

Geopandas error message during installation

I am trying install geopandas. I have using codes I can't find but i keep getting error messages. I have geopy already installed but can't install geopandas.
Result i had when running installation with anaconda prompt:
I had also tried installation using %pip install geopandas --user
Collecting geopandas
Using cached geopandas-0.8.1-py2.py3-none-any.whl (962 kB)
Collecting pyproj>=2.2.0
Using cached pyproj-2.6.1.post1-cp38-cp38-win32.whl (15.7 MB)
Collecting shapely
Using cached Shapely-1.7.1-cp38-cp38-win32.whl (894 kB)
Requirement already satisfied: pandas>=0.23.0 in c:\users\fejiro\anaconda3\lib\site-packages (from geopandas) (1.0.5)
Collecting fiona
Using cached Fiona-1.8.17.tar.gz (1.3 MB)
Note: you may need to restart the kernel to use updated packages.
ERROR: Command errored out with exit status 1:
command: 'C:\Users\fejiro\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\fejiro\\AppData\\Local\\Temp\\pip-install-q86d5ghj\\fiona\\setup.py'"'"'; __file__='"'"'C:\\Users\\fejiro\\AppData\\Local\\Temp\\pip-install-q86d5ghj\\fiona\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\fejiro\AppData\Local\Temp\pip-pip-egg-info-64u_nnsk'
cwd: C:\Users\fejiro\AppData\Local\Temp\pip-install-q86d5ghj\fiona\
Complete output (1 lines):
A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Can someone tell what to do?
It s better to use Anaconda distribution for more complex packages. Use install anaconda and then create an environment for the project. After that, you could use conda-forge to take care of all the compatibility problems

Microsoft Visual C++ 14.0 is required. error when downloading a python package

When im trying to download a python package 'pip install django-compressor' in my django project, its giving this error. So, how to solve this error?
PS C:\Users\HP\Desktop\acornaccounting> pip install django-compressor
Collecting django-compressor
Using cached https://files.pythonhosted.org/packages/02/7b/deb4605f95bcefb9760ff130533553230a1c25f4d383ed0735b075d71b29/django_compressor-2.2-py2.py3-none-any.whl
Requirement already satisfied: django-appconf>=1.0 in c:\users\hp\appdata\local\programs\python\python36\lib\site-packages (from django-compressor) (1.0.2)
Collecting rjsmin==1.0.12 (from django-compressor)
Using cached https://files.pythonhosted.org/packages/10/9c/2c45f57d43258b05bf33cf8f6c8161ea5abf8b4776a5c59d12646727cd98/rjsmin-1.0.12.tar.gz
Collecting rcssmin==1.0.6 (from django-compressor)
Using cached https://files.pythonhosted.org/packages/e2/5f/852be8aa80d1c24de9b030cdb6532bc7e7a1c8461554f6edbe14335ba890/rcssmin-1.0.6.tar.gz
Installing collected packages: rjsmin, rcssmin, django-compressor
Running setup.py install for rjsmin ... error
Complete output from command c:\users\hp\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-i9yu03ey\\rjsmin\\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\HP\AppData\Local\Temp\pip-record-sb4anuu2\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
copying .\rjsmin.py -> build\lib.win-amd64-3.6
running build_ext
building '_rjsmin' 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
Try this,
pip install rcssmin --install-option="--without-c-extensions"
pip install rjsmin --install-option="--without-c-extensions"
pip install django-compressor --upgrade
This solution works well, but it works much slower without the c extensions.
So better solution is, Intstall C++ dependencies , size of 1.1GB

Installing Flask using Pip

I'm a first timer to Python and I'm trying to set up an easy quick backend with it. When trying to install Flask using Pip I run this and see the following error:
Rutgers-MacBook-Pro:~ rutger$ pip install flask
Collecting flask
Downloading Flask-0.11.1-py2.py3-none-any.whl (80kB)
100% |████████████████████████████████| 81kB 1.3MB/s
Collecting itsdangerous>=0.21 (from flask)
Downloading itsdangerous-0.24.tar.gz (46kB)
100% |████████████████████████████████| 51kB 3.4MB/s
Collecting click>=2.0 (from flask)
Downloading click-6.6.tar.gz (283kB)
100% |████████████████████████████████| 286kB 1.5MB/s
Collecting Werkzeug>=0.7 (from flask)
Downloading Werkzeug-0.11.10-py2.py3-none-any.whl (306kB)
100% |████████████████████████████████| 307kB 1.7MB/s
Collecting Jinja2>=2.4 (from flask)
Downloading Jinja2-2.8-py2.py3-none-any.whl (263kB)
100% |████████████████████████████████| 266kB 2.7MB/s
Collecting MarkupSafe (from Jinja2>=2.4->flask)
Downloading MarkupSafe-0.23.tar.gz
Installing collected packages: itsdangerous, click, Werkzeug, MarkupSafe, Jinja2, flask
Running setup.py install for itsdangerous ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/15/tb28c0s930gf3k_7wxp56ckw0000gn/T/pip-build-X1QvJq/itsdangerous/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/15/tb28c0s930gf3k_7wxp56ckw0000gn/T/pip-l5geyj-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
copying itsdangerous.py -> build/lib
running install_lib
copying build/lib/itsdangerous.py -> /Library/Python/2.7/site-packages
error: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/itsdangerous.py'
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/15/tb28c0s930gf3k_7wxp56ckw0000gn/T/pip-build-X1QvJq/itsdangerous/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/15/tb28c0s930gf3k_7wxp56ckw0000gn/T/pip-l5geyj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/15/tb28c0s930gf3k_7wxp56ckw0000gn/T/pip-build-X1QvJq/itsdangerous/
I also see I've 2 versions of Python:
Rutgers-MacBook-Pro:~ rutger$ py
pydoc pydoc2.6 python python2 python2.6 python2.7 pythonw pythonw2.6
pydoc2 pydoc2.7 python-config python2-config python2.6-
Running 2.7 though:
Rutgers-MacBook-Pro:~ rutger$ python --version
Python 2.7.10
As you can see in the output, the error is
error: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/itsdangerous.py'
You can try again with sudo pip install flask which lets you run the original command as the root user.

Categories

Resources