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:
Related
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
Error:
(myvenv) (base) siddhants-MacBook-Air:personal-project siddhantbhargava$ pip install django-heroku
Collecting django-heroku
Using cached django_heroku-0.3.1-py2.py3-none-any.whl (6.2 kB)
Requirement already satisfied: dj-database-url>=0.5.0 in ./myvenv/lib/python3.8/site-packages (from django-heroku) (0.5.0)
Requirement already satisfied: whitenoise in ./myvenv/lib/python3.8/site-packages (from django-heroku) (5.2.0)
Requirement already satisfied: django in ./myvenv/lib/python3.8/site-packages (from django-heroku) (2.2.17)
Requirement already satisfied: pytz in ./myvenv/lib/python3.8/site-packages (from django->django-heroku) (2020.5)
Requirement already satisfied: sqlparse>=0.2.2 in ./myvenv/lib/python3.8/site-packages (from django->django-heroku) (0.4.1)
Collecting psycopg2
Using cached psycopg2-2.8.6.tar.gz (383 kB)
ERROR: Command errored out with exit status 1:
command: /Users/siddhantbhargava/personal-project/myvenv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-install-8opynhmw/psycopg2_6f717d71852848bb86def529de299ce9/setup.py'"'"'; __file__='"'"'/private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-install-8opynhmw/psycopg2_6f717d71852848bb86def529de299ce9/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 /private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-pip-egg-info-q4d5yztd
cwd: /private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-install-8opynhmw/psycopg2_6f717d71852848bb86def529de299ce9/
Complete output (23 lines):
running egg_info
creating /private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-pip-egg-info-q4d5yztd/psycopg2.egg-info
writing /private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-pip-egg-info-q4d5yztd/psycopg2.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-pip-egg-info-q4d5yztd/psycopg2.egg-info/dependency_links.txt
writing top-level names to /private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-pip-egg-info-q4d5yztd/psycopg2.egg-info/top_level.txt
writing manifest file '/private/var/folders/2n/rlv6c5zn6cbggrbcw65fvbz40000gn/T/pip-pip-egg-info-q4d5yztd/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
pip install django-heroku # deprecated
renamed package from django-heroku to django-on-heroku
pip install django-on-heroku # try this one
django-on-heroku PyPI
I need to install scipy version 1.1.0.
After I run the command pip install scipy==1.1.0, I get the following error:
Collecting scipy==1.1.0
Using cached scipy-1.1.0.tar.gz (15.6 MB)
Using legacy 'setup.py install' for scipy, since package 'wheel' is not installed.
Installing collected packages: scipy
Running setup.py install for scipy ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\myuser\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\myuser\\AppData\\Local\\Temp\\pip-install-n02rqpmt\\scipy\\setup.py'"'"'; __file__='"'"'C:\\Users\\myuser\\AppData\\Local\\Temp\\pip-install-n02rqpmt\\scipy\\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\myuser\AppData\Local\Temp\pip-record-qa6zm3ga\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\myuser\appdata\local\programs\python\python38\Include\scipy'
cwd: C:\Users\myuser\AppData\Local\Temp\pip-install-n02rqpmt\scipy\
Complete output (147 lines):
Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install scipy` (last SciPy release on PyPI)
help me please
You must first install the Python version compatible with scipy.
I could not use pip to install scipy version 1.1 [ I think this version is no longer supported on pip] and used conda instead:
conda install -c anaconda scipy==1.1.0
if you are using pip make sure that, of python2 is installed. or else try with the python3
pip install scipy==1.1.0 for python
pip3 install scipy==1.1.0 for python3
it will install successfully
pip install scipy==1.1.0
Collecting scipy==1.1.0
Downloading https://files.pythonhosted.org/packages/2a/f3/de9c1bd16311982711209edaa8c6caa962db30ebb6a8cc6f1dcd2d3ef616/scipy-1.1.0-cp27-cp27mu-manylinux1_x86_64.whl (30.8MB)
100% |████████████████████████████████| 30.8MB 36kB/s
Collecting numpy>=1.8.2 (from scipy==1.1.0)
Downloading https://files.pythonhosted.org/packages/3a/5f/47e578b3ae79e2624e205445ab77a1848acdaa2929a00eeef6b16eaaeb20/numpy-1.16.6-cp27-cp27mu-manylinux1_x86_64.whl (17.0MB)
100% |████████████████████████████████| 17.0MB 67kB/s
Installing collected packages: numpy, scipy
Successfully installed numpy-1.16.6 scipy-1.1.0
When i install scrapy in Python 3.8.2 in MacOS, Display:
Requirement already satisfied: six in /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from Automat>=0.3.0->Twisted) (1.15.0)
Requirement already satisfied: idna>=2.5 in /Library/Python/3.8/site-packages (from hyperlink>=17.1.1->Twisted) (2.10)
Building wheels for collected packages: Twisted
Building wheel for Twisted (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Applications/Xcode.app/Contents/Developer/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1w/wtkkznhd5x1f3kgx_x7yjh7r0000gn/T/pip-install-dh7kc0fc/Twisted/setup.py'"'"'; __file__='"'"'/private/var/folders/1w/wtkkznhd5x1f3kgx_x7yjh7r0000gn/T/pip-install-dh7kc0fc/Twisted/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 /private/var/folders/1w/wtkkznhd5x1f3kgx_x7yjh7r0000gn/T/pip-wheel-de42wco6 --python-tag cp38
use command: brew install python3. update python 3.83 to python 3.85. then restart macos. use command: pip3 install scrapy. it is OK.
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