I am unable to install wordcloud on vscode - python

I was working with sentiment analysis today, and when i started importing libraries i am unable to install wordcloud. it gives me an error as follows when i try to install pip install wordcloud. i also tried to install it by downloading it and copying it to my current directory and python -m pip install wordcloud-1.8.1-cp38-cp38-win_amd64.whl but that does not work too.
i.e. i am using windows, vscode and python3.9
The log error is
PS E:\projects\python\sentiment> 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\robel\appdata\local\programs\python\python39\lib\site-packages (from wordcloud) (1.20.3)
Requirement already satisfied: pillow in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from wordcloud) (8.2.0)
Requirement already satisfied: matplotlib in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from wordcloud) (3.4.2)
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->wordcloud) (2.4.7)
Requirement already satisfied: cycler>=0.10 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->wordcloud) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->wordcloud) (1.3.1)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->wordcloud) (2.8.1)
Requirement already satisfied: six in c:\users\robel\appdata\local\programs\python\python39\lib\site-packages (from cycler>=0.10->matplotlib->wordcloud) (1.16.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\robel\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8\setup.py'"'"'; file='"'"'C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8\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 'C:\Users\Robel\AppData\Local\Temp\pip-record-ppnm2m4u\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\robel\appdata\local\programs\python\python39\Include\wordcloud'
cwd: C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8
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 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\robel\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8\setup.py'"'"'; file='"'"'C:\Users\Robel\AppData\Local\Temp\pip-install-ij5wisei\wordcloud_65d6145d63024c6693ae2f4a8a7fb0a8\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 'C:\Users\Robel\AppData\Local\Temp\pip-record-ppnm2m4u\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\robel\appdata\local\programs\python\python39\Include\wordcloud' Check the logs for full command output.

Try installed worcloud by .whl file.
Choose the version that suit for you. Wordcloud.whl
Use cmd and type this command:
step 1
cd *your file directory path*
step 2
pip install *the file name.whl*

The comment made by #Wojciech Jakubas is what worked for me.
Download the wordcloud‑1.8.1‑cp39‑cp39‑win_amd64.whl file from here
(Note that the cp39 in the filename reflects the python version YOU are using, so make sure you download the compatible file. e.g. here cp39 means python 3.9)
Open the command prompt in the directory where the downloaded file is located. Or just cd your way there.
Run this command python -m pip install wordcloud-1.8.1-cp39-cp39-win_amd64.whl
(again make sure to use the specific filename of the file that you download as that may vary depending on what python version you're downloading your file for)
I'm making this comment, for one because my reputation is too low to reply others and second because this answer sort of makes the steps involved explicit for accessibility's sake.

The problem is that wordcloud has no prebuilt wheels for python3.9 on windows. Therefore when you install it it will download the source code and try to build the wheel.
In order to successfully build this wheel you need a c compiler.
As the error suggests you can download Microsoft C++ Build Tools.
After downloading and installing (make sure you have the correct version between 32 and 64 bit depending on your python architecture) then retry doing pip install wordcloud

Related

i have a problem with installing matplotlib [duplicate]

This question already has answers here:
Can't install Matplotlib on Python 3.10 after its release (2021-10-05)
(2 answers)
Closed 1 year ago.
i have a problem with installing matplotlib on my windows 10 machine
PS C:\Users\moham> pip install matplotlib
Collecting matplotlib
Using cached matplotlib-3.4.3.tar.gz (37.9 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: cycler>=0.10 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from matplotlib) (0.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from matplotlib) (1.3.2)
Requirement already satisfied: numpy>=1.16 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from matplotlib) (1.21.3)
Requirement already satisfied: pillow>=6.2.0 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from matplotlib) (8.4.0)
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from matplotlib) (3.0.3)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from matplotlib) (2.8.2)
Requirement already satisfied: six>=1.5 in c:\users\moham\appdata\local\programs\python\python310\lib\site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)
Building wheels for collected packages: matplotlib
Building wheel for matplotlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\moham\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\moham\\AppData\\Local\\Temp\\pip-install-flrd8ddj\\matplotlib_7091154205ba4de6adb6e99636c201f9\\setup.py'"'"'; __file__='"'"'C:\\Users\\moham\\AppData\\Local\\Temp\\pip-install-flrd8ddj\\matplotlib_7091154205ba4de6adb6e99636c201f9\\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'"'"'))' bdist_wheel -d 'C:\Users\moham\AppData\Local\Temp\pip-wheel-hj9g1qjt'
cwd: C:\Users\moham\AppData\Local\Temp\pip-install-flrd8ddj\matplotlib_7091154205ba4de6adb6e99636c201f9\
Complete output (553 lines):
Edit setup.cfg to change the build options; suppress output with --quiet.
BUILDING MATPLOTLIB
matplotlib: yes [3.4.3]
python: yes [3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC
v.1929 64 bit (AMD64)]]
platform: yes [win32]
tests: no [skipping due to configuration]
macosx: no [Mac OS-X only]
C:\Users\moham\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py:148: SetuptoolsDeprecationWarning: setup_requires is deprecated. Supply build dependencies using PEP 517 pyproject.toml build-requires.
warnings.warn(
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
copying lib\pylab.py -> build\lib.win-amd64-3.10
alot more lines from here
but somewhere in the middle it gets to this:
----------------------------------------
ERROR: Failed building wheel for matplotlib
Running setup.py clean for matplotlib
Failed to build matplotlib
Installing collected packages: matplotlib
Running setup.py install for matplotlib ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\moham\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\moham\\AppData\\Local\\Temp\\pip-install-flrd8ddj\\matplotlib_7091154205ba4de6adb6e99636c201f9\\setup.py'"'"'; __file__='"'"'C:\\Users\\moham\\AppData\\Local\\Temp\\pip-install-flrd8ddj\\matplotlib_7091154205ba4de6adb6e99636c201f9\\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 'C:\Users\moham\AppData\Local\Temp\pip-record-wj_x0r_i\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\moham\AppData\Local\Programs\Python\Python310\Include\matplotlib'
cwd: C:\Users\moham\AppData\Local\Temp\pip-install-flrd8ddj\matplotlib_7091154205ba4de6adb6e99636c201f9\
Complete output (553 lines):
Edit setup.cfg to change the build options; suppress output with --quiet.
BUILDING MATPLOTLIB
matplotlib: yes [3.4.3]
python: yes [3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC
v.1929 64 bit (AMD64)]]
platform: yes [win32]
tests: no [skipping due to configuration]
macosx: no [Mac OS-X only]
C:\Users\moham\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py:148: SetuptoolsDeprecationWarning: setup_requires is deprecated. Supply build dependencies using PEP 517 pyproject.toml build-requires.
warnings.warn(
running install
C:\Users\moham\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build\lib.win-amd64-3.10
copying lib\pylab.py -> build\lib.win-amd64-3.10
and alot more lines
and ends with this:
copying lib\matplotlib\mpl-data\images\zoom_to_rect_large.png -> build\lib.win-amd64-3.10\matplotlib\mpl-data\images copying lib\matplotlib\mpl-data\fonts\ttf\DejaVuSansDisplay.ttf -> build\lib.win-amd64-3.10\matplotlib\mpl-data\fonts\ttf
copying lib\matplotlib\mpl-data\fonts\afm\pagdo8a.afm -> build\lib.win-amd64-3.10\matplotlib\mpl-data\fonts\afm
copying lib\matplotlib\mpl-data\images\matplotlib.pdf -> build\lib.win-amd64-3.10\matplotlib\mpl-data\images
copying lib\matplotlib\backends\web_backend\css\page.css -> build\lib.win-amd64-3.10\matplotlib\backends\web_backend\css
copying lib\matplotlib\mpl-data\fonts\ttf\STIXSizFourSymBol.ttf -> build\lib.win-amd64-3.10\matplotlib\mpl-data\fonts\ttf
UPDATING build\lib.win-amd64-3.10\matplotlib\_version.py
set build\lib.win-amd64-3.10\matplotlib\_version.py to '3.4.3'
running build_ext
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
Building freetype in build\freetype-2.6.1
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\moham\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\moham\\AppData\\Local\\Temp\\pip-install-flrd8ddj\\matplotlib_7091154205ba4de6adb6e99636c201f9\\setup.py'"'"'; __file__='"'"'C:\\Users\\moham\\AppData\\Local\\Temp\\pip-install-flrd8ddj\\matplotlib_7091154205ba4de6adb6e99636c201f9\\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 'C:\Users\moham\AppData\Local\Temp\pip-record-wj_x0r_i\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\moham\AppData\Local\Programs\Python\Python310\Include\matplotlib' Check the logs for full command output.
PS C:\Users\moham>
..................................................................................................................................................................................................................................................................................................................................................................................
The latest stable version is 3.4.3. On PyPI there is no matplotlib wheel for 3.10, yet. So it try to compile from source. And for that it needs Microsoft Visual C++ 14.0 or greater.
However you can download unofficial binary from Gohlke
Alternatively you can use pipwin to install it from Gohlke. Note there may still be problems with dependencies.
Of course, you can also downgrade to python3.9.

Unable to install Lightfm

This is the error that I'm getting whenever I try to install a certain few libraries. I have tried updating my pip to the latest version. And I'm using python 3.8.5
C:\Users\Deep\Desktop\Sentiment Analysis>pip install lightfm
Collecting lightfm
Using cached lightfm-1.16.tar.gz (310 kB)
Requirement already satisfied: numpy in c:\users\deep\appdata\local\programs\python\python39\lib\site-packages (from lightfm) (1.20.1)
Requirement already satisfied: scipy>=0.17.0 in c:\users\deep\appdata\local\programs\python\python39\lib\site-packages (from lightfm) (1.6.1)
Requirement already satisfied: requests in c:\users\deep\appdata\local\programs\python\python39\lib\site-packages (from lightfm) (2.11.1)
Requirement already satisfied: scikit-learn in c:\users\deep\appdata\local\programs\python\python39\lib\site-packages (from lightfm) (0.24.1)
Requirement already satisfied: joblib>=0.11 in c:\users\deep\appdata\local\programs\python\python39\lib\site-packages (from scikit-learn->lightfm) (1.0.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\deep\appdata\local\programs\python\python39\lib\site-packages (from scikit-learn->lightfm) (2.1.0)
Using legacy 'setup.py install' for lightfm, since package 'wheel' is not installed.
Installing collected packages: lightfm
Running setup.py install for lightfm ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\deep\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Deep\\AppData\\Local\\Temp\\pip-install-2woi0con\\lightfm_42fc377b52074fbd9b3c493179e0e9fd\\setup.py'"'"'; __file__='"'"'C:\\Users\\Deep\\AppData\\Local\\Temp\\pip-install-2woi0con\\lightfm_42fc377b52074fbd9b3c493179e0e9fd\\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\Deep\AppData\Local\Temp\pip-record-2y1qyoq6\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\deep\appdata\local\programs\python\python39\Include\lightfm'
cwd: C:\Users\Deep\AppData\Local\Temp\pip-install-2woi0con\lightfm_42fc377b52074fbd9b3c493179e0e9fd\
Complete output (23 lines):
Compiling without OpenMP support.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\lightfm
copying lightfm\cross_validation.py -> build\lib.win-amd64-3.9\lightfm
copying lightfm\data.py -> build\lib.win-amd64-3.9\lightfm
copying lightfm\evaluation.py -> build\lib.win-amd64-3.9\lightfm
copying lightfm\lightfm.py -> build\lib.win-amd64-3.9\lightfm
copying lightfm\_lightfm_fast.py -> build\lib.win-amd64-3.9\lightfm
copying lightfm\__init__.py -> build\lib.win-amd64-3.9\lightfm
creating build\lib.win-amd64-3.9\lightfm\datasets
copying lightfm\datasets\movielens.py -> build\lib.win-amd64-3.9\lightfm\datasets
copying lightfm\datasets\stackexchange.py -> build\lib.win-amd64-3.9\lightfm\datasets
copying lightfm\datasets\_common.py -> build\lib.win-amd64-3.9\lightfm\datasets
copying lightfm\datasets\__init__.py -> build\lib.win-amd64-3.9\lightfm\datasets
copying lightfm\_lightfm_fast_no_openmp.c -> build\lib.win-amd64-3.9\lightfm
copying lightfm\_lightfm_fast_openmp.c -> build\lib.win-amd64-3.9\lightfm
running build_ext
building 'lightfm._lightfm_fast_no_openmp' 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\deep\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Deep\\AppData\\Local\\Temp\\pip-install-2woi0con\\lightfm_42fc377b52074fbd9b3c493179e0e9fd\\setup.py'"'"'; __file__='"'"'C:\\Users\\Deep\\AppData\\Local\\Temp\\pip-install-2woi0con\\lightfm_42fc377b52074fbd9b3c493179e0e9fd\\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\Deep\AppData\Local\Temp\pip-record-2y1qyoq6\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\deep\appdata\local\programs\python\python39\Include\lightfm' Check the logs for full command output.
try to install Build Tools for Visual Studio like it says in error and you can get it here https://visualstudio.microsoft.com/downloads/ or here https://visualstudio.microsoft.com/cs/visual-cpp-build-tools/

Can't install resampy

Ubuntu 20.04.2
I am using python2.7 in a virtualenv (because the program I'm trying to build doesn't work with my 3.8)
pip 20.3.4
The program I'm trying to run (involves tensorflow) comes with a file with all the things needed to install (I think that's a dockerfile?). When I try to run the program I get an error about one of the items in the dockerfile -- resampy.
I get an ImportError:No module resampy
I did a pip install resampy
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Processing /home/pete/.cache/pip/wheels/19/90/bb/f45e7cc1cfc8f5299c12511fccefcca90c801de995a4e7eb00/resampy-0.2.2-py2-none-any.whl
Collecting numba>=0.32
Using cached numba-0.47.0-cp27-cp27mu-manylinux1_x86_64.whl (3.6 MB)
Requirement already satisfied: numpy>=1.10 in /home/pete/env/py2.7/lib/python2.7/site-packages (from resampy) (1.13.1)
Requirement already satisfied: scipy>=0.13 in /home/pete/env/py2.7/lib/python2.7/site-packages (from resampy) (0.19.1)
Requirement already satisfied: six>=1.3 in /home/pete/env/py2.7/lib/python2.7/site-packages (from resampy) (1.11.0)
Requirement already satisfied: singledispatch; python_version < "3.4" in /home/pete/env/py2.7/lib/python2.7/site-packages (from numba>=0.32->resampy) (3.4.0.3)
Collecting llvmlite>=0.31.0dev0
Using cached llvmlite-0.32.1.tar.gz (104 kB)
Requirement already satisfied: setuptools in /home/pete/env/py2.7/lib/python2.7/site-packages (from numba>=0.32->resampy) (44.1.1)
Requirement already satisfied: funcsigs; python_version < "3.3" in /home/pete/env/py2.7/lib/python2.7/site-packages (from numba>=0.32->resampy) (1.0.2)
Requirement already satisfied: enum34; python_version < "3.4" in /home/pete/env/py2.7/lib/python2.7/site-packages (from numba>=0.32->resampy) (1.1.10)
Building wheels for collected packages: llvmlite
Building wheel for llvmlite (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/pete/env/py2.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UP2Yh4/llvmlite/setup.py'"'"'; __file__='"'"'/tmp/pip-install-UP2Yh4/llvmlite/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-ZIPpvD
cwd: /tmp/pip-install-UP2Yh4/llvmlite/
Complete output (7 lines):
running bdist_wheel
/home/pete/env/py2.7/bin/python /tmp/pip-install-UP2Yh4/llvmlite/ffi/build.py
File "/tmp/pip-install-UP2Yh4/llvmlite/ffi/build.py", line 122
raise ValueError(msg.format(_ver_check_skip)) from e
^
SyntaxError: invalid syntax
error: command '/home/pete/env/py2.7/bin/python' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite, numba, resampy
Running setup.py install for llvmlite ... error
ERROR: Command errored out with exit status 1:
command: /home/pete/env/py2.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UP2Yh4/llvmlite/setup.py'"'"'; __file__='"'"'/tmp/pip-install-UP2Yh4/llvmlite/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-j9jtLs/install-record.txt --single-version-externally-managed --compile --install-headers /home/pete/env/py2.7/include/site/python2.7/llvmlite
cwd: /tmp/pip-install-UP2Yh4/llvmlite/
Complete output (10 lines):
running install
running build
got version from file /tmp/pip-install-UP2Yh4/llvmlite/llvmlite/_version.py {'version': '0.32.1', 'full': 'aa11b129c0b55973067422397821ae6d44fa5e70'}
running build_ext
/home/pete/env/py2.7/bin/python /tmp/pip-install-UP2Yh4/llvmlite/ffi/build.py
File "/tmp/pip-install-UP2Yh4/llvmlite/ffi/build.py", line 122
raise ValueError(msg.format(_ver_check_skip)) from e
^
SyntaxError: invalid syntax
error: command '/home/pete/env/py2.7/bin/python' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/pete/env/py2.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UP2Yh4/llvmlite/setup.py'"'"'; __file__='"'"'/tmp/pip-install-UP2Yh4/llvmlite/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-j9jtLs/install-record.txt --single-version-externally-managed --compile --install-headers /home/pete/env/py2.7/include/site/python2.7/llvmlite Check the logs for full command output.
I tried a pip3 install resampy and the result looks better:
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: resampy in /usr/local/lib/python3.8/dist-packages (0.2.2)
Requirement already satisfied: numba>=0.32 in /usr/local/lib/python3.8/dist-packages (from resampy) (0.52.0)
Requirement already satisfied: scipy>=0.13 in /usr/local/lib/python3.8/dist-packages (from resampy) (1.6.0)
Requirement already satisfied: numpy>=1.10 in /home/pete/.local/lib/python3.8/site-packages (from resampy) (1.19.4)
Requirement already satisfied: six>=1.3 in /usr/lib/python3/dist-packages (from resampy) (1.14.0)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from numba>=0.32->resampy) (45.2.0)
Requirement already satisfied: llvmlite<0.36,>=0.35.0 in /usr/local/lib/python3.8/dist-packages (from numba>=0.32->resampy) (0.35.0)
WARNING: You are using pip version 20.3.3; however, version 21.0.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
No error. But when I try and run the program I'm trying to run I still get the original ImportError
I admit that I'm in over my head here. I basically only have a moderate level of python knowledge/experience. I don't even know what a "wheel" is and I can't find anything in it because "wheel" is kind of hard to google without finding stuff about tires and such. So even just pointers to learn about what a "wheel" is would be helpful.
Thanks!
Maybe try out this one
pip install llvmlite==0.31.0
pip install resampy
In my case, the current llvmlite package version crashed it. But this package is needed for resampy.
You could also try an earlier version of resampy, which is independent of llvmlite.
pip install resampy==0.1.5
Good Luck
I tried py27 installation failed too before.
But you can install it using py38 via
pip install resampy
You can test it by
pip install -e .[tests]
pip install pytest pytest-cov pytest-faulthandler
py.test --cov-report term-missing --cov resampy
The result:
As for the ImportError, once you successfully installed it, it works well for me:

Install wordcloud in jetbrains pycharm with python version 3.6 failed

I am trying to install wordcloud in pycharm (pip install wordcloud) with python 3.6 in terminal but getting this error. I install every library in terminal with pip install statement but failed to install wordcloud. How can I solve this?
(venv) C:\Users\Mansi Dhingra\Desktop\Projects\api>pip install wordcloud
Collecting wordcloud
Using cached https://files.pythonhosted.org/packages/6b/9f/27cec92eee9f1d4f02f986ad0cc6dfc0797b117be6e968da8f92c6c183aa/wordcloud-1.7.0.tar.gz
Requirement already satisfied: numpy>=1.6.1 in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from wordcloud)
Requirement already satisfied: pillow in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from wordcloud)
Requirement already satisfied: matplotlib in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from wordcloud)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from matplotlib->wordcloud)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from matplotlib->wordcloud)
Requirement already satisfied: cycler>=0.10 in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from matplotlib->wordcloud)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from matplotlib->wordcloud)
Requirement already satisfied: six>=1.5 in c:\users\mansi dhingra\desktop\projects\api\venv\lib\site-packages (from python-dateutil>=2.1->matplotlib->wordcloud)
Installing collected packages: wordcloud
Running setup.py install for wordcloud ... error
Complete output from command "C:\Users\Mansi Dhingra\Desktop\Projects\api\venv\Scripts\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\MANSID~1\\AppData\\Local\\T
emp\\pip-build-hzywsg3f\\wordcloud\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --r
ecord C:\Users\MANSID~1\AppData\Local\Temp\pip-otlfw3d1-record\install-record.txt --single-version-externally-managed --compile --install-headers "C:\Users\Mansi Dhingra\Desktop\Projects
\api\venv\include\site\python3.7\wordcloud":
C:\Users\Mansi Dhingra\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\wordcloud
copying wordcloud\color_from_image.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\tokenization.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\wordcloud.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\wordcloud_cli.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\_version.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\__init__.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\__main__.py -> build\lib.win32-3.7\wordcloud
copying wordcloud\stopwords -> build\lib.win32-3.7\wordcloud
copying wordcloud\DroidSansMono.ttf -> build\lib.win32-3.7\wordcloud
UPDATING build\lib.win32-3.7\wordcloud/_version.py
set build\lib.win32-3.7\wordcloud/_version.py to '1.7.0'
running build_ext
building 'wordcloud.query_integral_image' 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\Mansi Dhingra\Desktop\Projects\api\venv\Scripts\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\MANSID~1\\AppData\\Local\\Temp\\pip-build-hzywsg3f\
\wordcloud\\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\MANSID~1\
AppData\Local\Temp\pip-otlfw3d1-record\install-record.txt --single-version-externally-managed --compile --install-headers "C:\Users\Mansi Dhingra\Desktop\Projects\api\venv\include\site\p
ython3.7\wordcloud"" failed with error code 1 in C:\Users\MANSID~1\AppData\Local\Temp\pip-build-hzywsg3f\wordcloud\
wordcloud 1.7.0 provides a lot of wheels for w32 but not for Python 3.8. My advice downgrade to Python 3.7 64-bit.
If you want to install wordcloud for Python 3.8 you must have Microsoft Visual C++ 14.0 to compile C/C++ modules.

Not able to install python-binance on pycharm Windows 10

Installation of Twisted==17.9.0 fails on Python 3.7.3. Also can't install Cryptography==2.1.4
Want to install necessary modules on Pycharm for python-binance
I've tried using the anaconda version of python but with that I still get the install error with cryptography.
C:\Users\Laptop\PycharmProjects\Python Trading2\venv\Scripts>pip install Twisted==17.9.0
Collecting hyperlink>=17.1.1 (from Twisted==17.9.0)
Using cached https://files.pythonhosted.org/packages/7f/91/e916ca10a2de1cb7101a9b24da546fb90ee14629e23160086cf3361c4fb8/hyperlink-19.0.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in c:\program files\python37\lib\site-packages (from zope.interface>=4.0.2->Twisted==17.9.0) (39.0.1)
Collecting attrs>=16.1.0 (from Automat>=0.3.0->Twisted==17.9.0)
Using cached https://files.pythonhosted.org/packages/23/96/d828354fa2dbdf216eaa7b7de0db692f12c234f7ef888cc14980ef40d1d2/attrs-19.1.0-py2.py3-none-any.whl
Requirement already satisfied: six in c:\program files\python37\lib\site-packages (from Automat>=0.3.0->Twisted==17.9.0) (1.12.0)
Requirement already satisfied: idna>=2.5 in c:\program files\python37\lib\site-packages (from hyperlink>=17.1.1->Twisted==17.9.0) (2.8)
Installing collected packages: zope.interface, constantly, incremental, attrs, Automat, hyperlink, Twisted
Running setup.py install for Twisted ... error
ERROR: Complete output from command 'c:\program files\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\Laptop\\AppData\\Local\\Temp\\pip-install-x06wgdqo\\Twisted\\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\Laptop\AppData\Local\Temp\pip-record-jhd2kvhg\install-record.txt' --single-version-externally-managed --compile:
ERROR: running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\twisted
copying src\twisted\copyright.py -> build\lib.win-amd64-3.7\twisted
copying src\twisted\plugin.py -> build\lib.win-amd64-3.7\twisted
copying src
And on and on in red.
Today I encountered the same problem Tried everything. Then everything made sense.
Install VSC build tools:
https://learn.microsoft.com/en-us/answers/questions/136595/error-microsoft-visual-c-140-or-greater-is-require.html
Download https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted (if you get .whl error)(file name "Twisted-20.3.0-cp39-cp39-win_amd64.whl" ). install it using CMD location/filename.
Install through cmd:
pip Install Scrapy

Categories