I have some problem python packages in Google Compute engine - python

I want to my code running for 24 hours.
So i made Google Cloude Compute Engine instance
and tried install python and other packages
but ccxt package has a error to install
this is error sentence
~$ pip3 install ccxt
Collecting ccxt
Using cached https://files.pythonhosted.org/packages/78/ec/1b33bd878c88898079e8582d01ad7f6e9d7b99377015e768537269
9cf7e5/ccxt-1.73.12-py2.py3-none-any.whl
Requirement already satisfied: aiohttp>=3.8; python_version >= "3.5.2" in ./.local/lib/python3.7/site-packages (fro
m ccxt) (3.8.1)
Requirement already satisfied: requests>=2.18.4 in ./.local/lib/python3.7/site-packages (from ccxt) (2.27.1)
Requirement already satisfied: cryptography>=2.6.1 in /usr/lib/python3/dist-packages (from ccxt) (2.6.1)
Requirement already satisfied: yarl==1.7.2; python_version >= "3.5.2" in ./.local/lib/python3.7/site-packages (from
ccxt) (1.7.2)
Requirement already satisfied: certifi>=2018.1.18 in ./.local/lib/python3.7/site-packages (from ccxt) (2021.10.8)
Collecting aiodns>=1.1.1; python_version >= "3.5.2" (from ccxt)
Using cached https://files.pythonhosted.org/packages/ab/72/991ee33a517df69c6cd6f3486cfe9b6329557cb55acaa8cefac33c
2aa4d2/aiodns-3.0.0-py3-none-any.whl
Requirement already satisfied: setuptools>=60.9.0 in ./.local/lib/python3.7/site-packages (from ccxt) (60.9.1)
Requirement already satisfied: multidict<7.0,>=4.5 in ./.local/lib/python3.7/site-packages (from aiohttp>=3.8; pyth
on_version >= "3.5.2"->ccxt) (6.0.2)
Requirement already satisfied: aiosignal>=1.1.2 in ./.local/lib/python3.7/site-packages (from aiohttp>=3.8; python_
version >= "3.5.2"->ccxt) (1.2.0)
Requirement already satisfied: asynctest==0.13.0; python_version < "3.8" in ./.local/lib/python3.7/site-packages (f
rom aiohttp>=3.8; python_version >= "3.5.2"->ccxt) (0.13.0)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in ./.local/lib/python3.7/site-packages (from aiohttp>=
3.8; python_version >= "3.5.2"->ccxt) (2.0.12)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in ./.local/lib/python3.7/site-packages (from aiohttp>=3
.8; python_version >= "3.5.2"->ccxt) (4.0.2)
Requirement already satisfied: typing-extensions>=3.7.4; python_version < "3.8" in ./.local/lib/python3.7/site-pack
ages (from aiohttp>=3.8; python_version >= "3.5.2"->ccxt) (4.1.1)
Requirement already satisfied: attrs>=17.3.0 in ./.local/lib/python3.7/site-packages (from aiohttp>=3.8; python_ver
sion >= "3.5.2"->ccxt) (21.4.0)
Requirement already satisfied: frozenlist>=1.1.1 in ./.local/lib/python3.7/site-packages (from aiohttp>=3.8; python
_version >= "3.5.2"->ccxt) (1.3.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./.local/lib/python3.7/site-packages (from requests>=2.18.4
->ccxt) (1.26.8)
Requirement already satisfied: idna<4,>=2.5; python_version >= "3" in ./.local/lib/python3.7/site-packages (from re
quests>=2.18.4->ccxt) (3.3)
Collecting pycares>=4.0.0 (from aiodns>=1.1.1; python_version >= "3.5.2"->ccxt)
Using cached https://files.pythonhosted.org/packages/4c/5a/a82398e38049e689350f07b46dd8493a8a74821e39c2b904350a31
60c1cb/pycares-4.1.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.w
hl
Collecting cffi>=1.5.0 (from pycares>=4.0.0->aiodns>=1.1.1; python_version >= "3.5.2"->ccxt)
Using cached https://files.pythonhosted.org/packages/00/9e/92de7e1217ccc3d5f352ba21e52398372525765b2e0c4530e6eb2b
a9282a/cffi-1.15.0.tar.gz
Requirement already satisfied: pycparser in ./.local/lib/python3.7/site-packages (from cffi>=1.5.0->pycares>=4.0.0-
>aiodns>=1.1.1; python_version >= "3.5.2"->ccxt) (2.21)
Building wheels for collected packages: cffi
Running setup.py bdist_wheel for cffi ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-afnot
79o/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(c
ompile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-p40y4ye4 --python-tag cp37:
running bdist_wheel
running build
running build_py
running build_ext
building '_cffi_backend' extension
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
----------------------------------------
Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: cffi, pycares, aiodns, ccxt
Running setup.py install for cffi ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-afn
ot79o/cffi/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-yai9v9gy/install-record.txt --single-version-ex
ternally-managed --compile --user --prefix=:
running install
/home/dlqudgjs12/.local/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarn
ing: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_py
running build_ext
building '_cffi_backend' extension
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-afnot79o/cffi/setup.py';f=g
etattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__,
'exec'))" install --record /tmp/pip-record-yai9v9gy/install-record.txt --single-version-externally-managed --compi
le --user --prefix=" failed with error code 1 in /tmp/pip-install-afnot79o/cffi/
i tried to solve this problem.
but i couldn't find right solution
also other packages..
pip3 install TA-lib
pip3 install pandas_ta
both packages are stoped during install..

Several reasons may trigger this error. To mention a few:
Your system development libraries are missing.
You may not be running pip from your virtual environment.
You didn’t specify when you were installing PIL.
The error : x86_64-Linux-gnu-gcc failed with exit status 1 can be triggered by missing system development libraries packages, installing these library packages can fix the problem.(e.g. ffi→ libffi, ssl → libssl).
Install the appropriate packages by the following command
sudo apt-get install python3-dev
or for a specific version of Python 3, replace x with the minor version in
sudo apt-get install python3.x-dev
Try this command for installing the library package.
sudo apt-get install libffi-dev
Refer to the link for more information on why this error will trigger.

Related

Installing matplotlib with pip under macos 11.5

I’m trying to install matplotlib with pip on an M1 mac with macOS 11.4, but get the following error:
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting matplotlib
Using cached matplotlib-3.4.3.tar.gz (37.9 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: cycler>=0.10 in /opt/homebrew/lib/python3.9/site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/homebrew/lib/python3.9/site-packages (from matplotlib) (1.3.2)
Requirement already satisfied: numpy>=1.16 in /opt/homebrew/lib/python3.9/site-packages (from matplotlib) (1.21.2)
Requirement already satisfied: pillow>=6.2.0 in /opt/homebrew/lib/python3.9/site-packages (from matplotlib) (8.3.2)
Requirement already satisfied: pyparsing>=2.2.1 in /opt/homebrew/lib/python3.9/site-packages (from matplotlib) (2.4.7)
Requirement already satisfied: python-dateutil>=2.7 in /opt/homebrew/lib/python3.9/site-packages (from matplotlib) (2.8.2)
Requirement already satisfied: six in /opt/homebrew/lib/python3.9/site-packages (from cycler>=0.10->matplotlib) (1.16.0)
Building wheels for collected packages: matplotlib
Building wheel for matplotlib (setup.py): started
Building wheel for matplotlib (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/python#3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/z1/6807g5fn2tl27vlms0t5wqnm0000gq/T/pip-install-7jtr3een/matplotlib_9167cea08b4b47ea908a69fdb7be92b9/setup.py'"'"'; __file__='"'"'/private/var/folders/z1/6807g5fn2tl27vlms0t5wqnm0000gq/T/pip-install-7jtr3een/matplotlib_9167cea08b4b47ea908a69fdb7be92b9/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 /private/var/folders/z1/6807g5fn2tl27vlms0t5wqnm0000gq/T/pip-wheel-ipsv3z0z
cwd: /private/var/folders/z1/6807g5fn2tl27vlms0t5wqnm0000gq/T/pip-install-7jtr3een/matplotlib_9167cea08b4b47ea908a69fdb7be92b9/
Complete output (639 lines):
(due to lengh restrictions here, the full output can be found at https://pastebin.com/MyGhbE5q )
Any ideas how to fix?
This happens both if I run
pip install matplotlib
or
pip3 install matplotlib

pip fails to install. Results in "command errored out with exit status 1" [duplicate]

This question already has answers here:
How to solve "error: Microsoft Visual C++ 14.0 or greater is required" when installing Python packages?
(9 answers)
Closed 1 year ago.
I work in R, which is MUCH better than python. Pip will not install anything for me aside from generic boring python packages. Is there a way to manually install packages without going through this insufferable process?
pip3 install scrublet
Requirement already satisfied: scrublet in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages\scrublet-0.2.1-py3.9.egg (0.2.1)
Requirement already satisfied: cython in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages\cython-3.0a6-py3.9.egg (from scrublet) (3.0a6)
Requirement already satisfied: numpy in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from scrublet) (1.20.1)
Requirement already satisfied: scipy in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from scrublet) (1.6.1)
Requirement already satisfied: scikit-learn in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages\scikit_learn-0.24.1-py3.9-win-amd64.egg (from scrublet) (0.24.1)
Requirement already satisfied: scikit-image in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from scrublet) (0.18.1)
Requirement already satisfied: matplotlib in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from scrublet) (3.3.4)
Collecting annoy
Using cached annoy-1.17.0.tar.gz (646 kB)
Requirement already satisfied: numba in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages\numba-0.53.0rc2-py3.9-win-amd64.egg (from scrublet) (0.53.0rc2)
Requirement already satisfied: pandas in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages\pandas-1.2.2-py3.9-win-amd64.egg (from scrublet) (1.2.2)
Requirement already satisfied: umap-learn in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages\umap_learn-0.5.1-py3.9.egg (from scrublet) (0.5.1)
Requirement already satisfied: pillow>=6.2.0 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->scrublet) (8.1.0)
Requirement already satisfied: cycler>=0.10 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->scrublet) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->scrublet) (1.3.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->scrublet) (2.4.7)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from matplotlib->scrublet) (2.8.1)
Requirement already satisfied: six in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from cycler>=0.10->matplotlib->scrublet) (1.15.0)
Requirement already satisfied: llvmlite<0.37,>=0.36.0rc1 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from numba->scrublet) (0.36.0rc2)
Requirement already satisfied: setuptools in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from numba->scrublet) (54.0.0)
Requirement already satisfied: pytz>=2017.3 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from pandas->scrublet) (2021.1)
Requirement already satisfied: networkx>=2.0 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from scikit-image->scrublet) (2.5)
Requirement already satisfied: tifffile>=2019.7.26 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from scikit-image->scrublet) (2021.2.26)
Requirement already satisfied: imageio>=2.3.0 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from scikit-image->scrublet) (2.9.0)
Requirement already satisfied: PyWavelets>=1.1.1 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from scikit-image->scrublet) (1.1.1)
Requirement already satisfied: decorator>=4.3.0 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from networkx>=2.0->scikit-image->scrublet) (4.4.2)
Requirement already satisfied: joblib>=0.11 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from scikit-learn->scrublet) (1.0.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from scikit-learn->scrublet) (2.1.0)
Requirement already satisfied: pynndescent>=0.5 in c:\users\danie\appdata\local\programs\python\python39\lib\site-packages (from umap-learn->scrublet) (0.5.2)
Using legacy 'setup.py install' for annoy, since package 'wheel' is not installed.
Installing collected packages: annoy
Running setup.py install for annoy ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\danie\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Windows\\Temp\\pip-install-omk6ze2e\\annoy_3047d582a1534335aeb9b39626f0c183\\setup.py'"'"'; __file__='"'"'C:\\Windows\\Temp\\pip-install-omk6ze2e\\annoy_3047d582a1534335aeb9b39626f0c183\\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:\Windows\Temp\pip-record-x7azmtt5\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\danie\appdata\local\programs\python\python39\Include\annoy'
cwd: C:\Windows\Temp\pip-install-omk6ze2e\annoy_3047d582a1534335aeb9b39626f0c183\
Complete output (11 lines):
WARNING: The wheel package is not available.
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\annoy
copying annoy\__init__.py -> build\lib.win-amd64-3.9\annoy
running build_ext
building 'annoy.annoylib' 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\danie\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Windows\\Temp\\pip-install-omk6ze2e\\annoy_3047d582a1534335aeb9b39626f0c183\\setup.py'"'"'; __file__='"'"'C:\\Windows\\Temp\\pip-install-omk6ze2e\\annoy_3047d582a1534335aeb9b39626f0c183\\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:\Windows\Temp\pip-record-x7azmtt5\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\danie\appdata\local\programs\python\python39\Include\annoy' Check the logs for full command output.
Judging by the packages you are installing, I would recommend trying Anaconda. It will install all of your data science related packages for you and make sure there are NO version mismatches between packages.
In my experience, I've spend dozens of hours fighting with screens like the one above. Then, I used the Anaconda distribution and everything "just worked".

Trouble installing Fiona for python 3.6.4 (windows 64 bit) [duplicate]

This question already has answers here:
Provide a path to gdal-config using a GDAL_CONFIG environment variable error while attempting to install Fiona
(2 answers)
Closed 2 years ago.
C:\Users\white>pip install C:\Users\white\Downloads\geopandas-0.8.0-py2.py3-none-any.whl
Processing c:\users\white\downloads\geopandas-0.8.0-py2.py3-none-any.whl
Requirement already satisfied: shapely in c:\users\white\desktop\python\lib\site-packages (from geopandas==0.8.0) (1.7.0)
Collecting pyproj>=2.2.0
Downloading pyproj-2.6.1.post1-cp36-cp36m-win_amd64.whl (17.3 MB)
|████████████████████████████████| 17.3 MB 3.3 MB/s
Requirement already satisfied: pandas>=0.23.0 in c:\users\white\desktop\python\lib\site-packages (from geopandas==0.8.0) (0.24.1)
Collecting fiona
Using cached Fiona-1.8.13.post1.tar.gz (1.2 MB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\white\desktop\python\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\white\\AppData\\Local\\Temp\\pip-install-wt55_vfn\\fiona\\setup.py'"'"'; __file__='"'"'C:\\Users\\white\\AppData\\Local\\Temp\\pip-install-wt55_vfn\\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\white\AppData\Local\Temp\pip-install-wt55_vfn\fiona\pip-egg-info'
cwd: C:\Users\white\AppData\Local\Temp\pip-install-wt55_vfn\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.
WARNING: You are using pip version 20.0.2; however, version 20.1.1 is available.
You should consider upgrading via the 'c:\users\white\desktop\python\python.exe -m pip install --upgrade pip' command.
That's the error I get when trying to install geopandas, it fails on installing Fiona. I tried to install fiona via a whl from the windows whl repository but it told me
C:\Users\white>pip install C:\Users\white\Downloads\Fiona-1.8.4-cp34-cp34m-win_amd64.whl
ERROR: Fiona-1.8.4-cp34-cp34m-win_amd64.whl is not a supported wheel on this platform.
WARNING: You are using pip version 20.0.2; however, version 20.1.1 is available.
You should consider upgrading via the 'c:\users\white\desktop\python\python.exe -m pip install --upgrade pip' command.
Welcome. So there a couple of things you could do. I am running python 3.7, win x64.
Get the GDAL binary distribution from here
I used GDAL-3.1.1-cp37-cp37m-win_amd64.whl.
Then I downloaded Fiona whl from here, specifically Fiona-1.8.13-cp37-cp37m-win_amd64.whl.
On to the installation
First install GDAL binary distribution from 2 above.
set GDAL_VERSION=3.1.1 in the same command prompt session.
Modify you PATH to include GDAL include files, specifically gdal.h
For me the location was %PYTHON_HOME%\Lib\site-packages\osgeo\include\gdal
Like set PATH=%PYTHON_HOME%\Lib\site-packages\osgeo\include\gdal:%PATH%
Then install Fiona, from point 3 above Fiona-1.8.13-cp37-cp37m-win_amd64.whl.
Lastly, install your geopandas library.
Below is my output.
S:\so>pip install GDAL-3.1.1-cp37-cp37m-win_amd64.whl
Processing s:\so\gdal-3.1.1-cp37-cp37m-win_amd64.whl
Installing collected packages: GDAL
Successfully installed GDAL-3.1.1
S:\so>set GDAL_VERSION=3.1.1
set PATH=%PYTHON_HOME%\Lib\site-packages\osgeo\include\gdal\:%PATH%
S:\so>pip install Fiona-1.8.13-cp37-cp37m-win_amd64.whl
Processing s:\so\fiona-1.8.13-cp37-cp37m-win_amd64.whl
Requirement already satisfied: click>=4.0 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
Fiona==1.8.13) (7.1.2)
Requirement already satisfied: attrs>=17 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
Fiona==1.8.13) (19.3.0)
Requirement already satisfied: six>=1.7 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
Fiona==1.8.13) (1.14.0)
Requirement already satisfied: click-plugins>=1.0 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
Fiona==1.8.13) (1.1.1)
Requirement already satisfied: cligj>=0.5 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
Fiona==1.8.13) (0.5.0)
Requirement already satisfied: gdal~=3.1.1 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
Fiona==1.8.13) (3.1.1)
Requirement already satisfied: munch in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
Fiona==1.8.13) (2.5.0)
Installing collected packages: Fiona
Successfully installed Fiona-1.8.13
S:\so>pip install geopandas-0.8.0-py2.py3-none-any.whl
Processing s:\so\geopandas-0.8.0-py2.py3-none-any.whl
Requirement already satisfied: pyproj>=2.2.0 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
geopandas==0.8.0) (2.6.1.post1)
Requirement already satisfied: fiona in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
geopandas==0.8.0) (1.8.13)
Requirement already satisfied: pandas>=0.23.0 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
geopandas==0.8.0) (1.0.5)
Requirement already satisfied: shapely in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
geopandas==0.8.0) (1.7.0)
Requirement already satisfied: six>=1.7 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from fiona-
>geopandas==0.8.0) (1.14.0)
Requirement already satisfied: munch in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from fiona-
>geopandas==0.8.0) (2.5.0)
Requirement already satisfied: attrs>=17 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from fiona-
>geopandas==0.8.0) (19.3.0)
Requirement already satisfied: cligj>=0.5 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from fiona-
>geopandas==0.8.0) (0.5.0)
Requirement already satisfied: click>=4.0 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from fiona-
>geopandas==0.8.0) (7.1.2)
Requirement already satisfied: click-plugins>=1.0 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from fiona-
>geopandas==0.8.0) (1.1.1)
Requirement already satisfied: gdal~=3.1.1 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from fiona-
>geopandas==0.8.0) (3.1.1)
Requirement already satisfied: numpy>=1.13.3 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
pandas>=0.23.0->geopandas==0.8.0) (1.19.0)
Requirement already satisfied: python-dateutil>=2.6.1 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
pandas>=0.23.0->geopandas==0.8.0) (2.8.1)
Requirement already satisfied: pytz>=2017.2 in
c:\users\so\appdata\local\programs\python\python37\lib\site-packages (from
pandas>=0.23.0->geopandas==0.8.0) (2020.1)
Installing collected packages: geopandas
Successfully installed geopandas-0.8.0
S:\so>python
Python 3.7.7 (tags/v3.7.7:d7c567b08f)
Type "help", "copyright", "credits" or "license" for more information.
>>> import geopandas
>>> geopandas.__version__
'0.8.0'
>>> geopandas.__file__
'C:\\Users\\so\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-
packages\\geopandas\\__init__.py'
>>>
HTH
More help here Under Installation -> Windows.

I cant install torch-sparse in Google Colab

I am trying to install torch-sparse in Google Colab using ! pip install torch-sparse, but i am getting the following erorr:
Collecting torch-sparse
Using cached https://files.pythonhosted.org/packages/0e/bf/6242893c898621e7e4756e1ad298e903df6dfae208aec1c32adf8cfd1f7f/torch_sparse-0.4.4.tar.gz
Requirement already satisfied: scipy in /usr/local/lib/python3.6/dist-packages (from torch-sparse) (1.4.1)
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.6/dist-packages (from scipy->torch-sparse) (1.17.5)
Building wheels for collected packages: torch-sparse
Building wheel for torch-sparse (setup.py) ... error
ERROR: Failed building wheel for torch-sparse
Running setup.py clean for torch-sparse
Failed to build torch-sparse
Installing collected packages: torch-sparse
Running setup.py install for torch-sparse ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-h3_oysnr/torch-sparse/setup.py'"'"'; __file__='"'"'/tmp/pip-install-h3_oysnr/torch-sparse/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-0xvimdk5/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
How can I fix it?
You need to go into Runtime -> Change runtime type and choose a GPU as the Hardware accelerator. After this it should install fine.
Collecting torch-sparse
Downloading https://files.pythonhosted.org/packages/0e/bf/6242893c898621e7e4756e1ad298e903df6dfae208aec1c32adf8cfd1f7f/torch_sparse-0.4.4.tar.gz
Requirement already satisfied: scipy in /usr/local/lib/python3.6/dist-packages (from torch-sparse) (1.4.1)
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.6/dist-packages (from scipy->torch-sparse) (1.17.5)
Building wheels for collected packages: torch-sparse
Building wheel for torch-sparse (setup.py) ... done
Created wheel for torch-sparse: filename=torch_sparse-0.4.4-cp36-cp36m-linux_x86_64.whl size=4956229 sha256=0463ad1735eb37f9f555b7c83b32bd43cfee20e312061e8efca43f2c29158fbb
Stored in directory: /root/.cache/pip/wheels/8a/1a/6f/88952b83ebba6b2742909fcd6e320e3a99fc7d2a2428391f8c
Successfully built torch-sparse
Installing collected packages: torch-sparse
Successfully installed torch-sparse-0.4.4

Watson Developer Cloud showing error: Microsoft Visual C++ 14.0 is required

I am trying Watson visual recognition with Python, following this: https://www.ibm.com/watson/developercloud/visual-recognition/api/v3/python.html?python#introduction
while tried to install the library:
pip install --upgrade "watson-developer-cloud>=1.2.1"
I am getting following error even after installing "Microsoft Visual C++ 14.0", I have uninstalled other versions of MSVC++ too.
Collecting watson-developer-cloud>=1.2.1
Using cached watson-developer-cloud-1.2.1.tar.gz
Requirement already up-to-date: requests<3.0,>=2.0 in c:\python36\lib\site-packages (from watson-developer-cloud>=1.2.1)
Requirement already up-to-date: python_dateutil>=2.5.3 in c:\python36\lib\site-packages (from watson-developer-cloud>=1.2.1)
Requirement already up-to-date: autobahn>=0.10.9 in c:\python36\lib\site-packages (from watson-developer-cloud>=1.2.1)
Collecting Twisted>=13.2.0 (from watson-developer-cloud>=1.2.1)
Using cached Twisted-17.9.0.tar.bz2
Collecting pyOpenSSL>=16.2.0 (from watson-developer-cloud>=1.2.1)
Using cached pyOpenSSL-17.5.0-py2.py3-none-any.whl
Collecting service-identity>=17.0.0 (from watson-developer-cloud>=1.2.1)
Using cached service_identity-17.0.0-py2.py3-none-any.whl
Requirement already up-to-date: idna<2.7,>=2.5 in c:\python36\lib\site-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: certifi>=2017.4.17 in c:\python36\lib\site-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in c:\python36\lib\site-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: urllib3<1.23,>=1.21.1 in c:\python36\lib\site-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: six>=1.5 in c:\python36\lib\site-packages (from python_dateutil>=2.5.3->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: txaio>=2.7.0 in c:\python36\lib\site-packages (from autobahn>=0.10.9->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: zope.interface>=4.0.2 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: constantly>=15.1 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: incremental>=16.10.1 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: Automat>=0.3.0 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: hyperlink>=17.1.1 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Collecting cryptography>=2.1.4 (from pyOpenSSL>=16.2.0->watson-developer-cloud>=1.2.1)
Using cached cryptography-2.2.2-cp36-cp36m-win_amd64.whl
Collecting pyasn1 (from service-identity>=17.0.0->watson-developer-cloud>=1.2.1)
Using cached pyasn1-0.4.2-py2.py3-none-any.whl
Collecting pyasn1-modules (from service-identity>=17.0.0->watson-developer-cloud>=1.2.1)
Using cached pyasn1_modules-0.2.1-py2.py3-none-any.whl
Requirement already up-to-date: attrs in c:\python36\lib\site-packages (from service-identity>=17.0.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: setuptools in c:\python36\lib\site-packages (from zope.interface>=4.0.2->Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography>=2.1.4->pyOpenSSL>=16.2.0->watson-developer-cloud>=1.2.1)
Using cached cffi-1.11.5-cp36-cp36m-win_amd64.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=2.1.4->pyOpenSSL>=16.2.0->watson-developer-cloud>=1.2.1)
Using cached asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=2.1.4->pyOpenSSL>=16.2.0->watson-developer-cloud>=1.2.1)
Using cached pycparser-2.18.tar.gz
Installing collected packages: Twisted, pycparser, cffi, asn1crypto, cryptography, pyOpenSSL, pyasn1, pyasn1-modules, service-identity, watson-developer-cloud
Running setup.py install for Twisted: started
Running setup.py install for Twisted: finished with status 'error'
Complete output from command c:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\IPC_AD~1\\AppData\\Local\\Temp\\pip-build-ahl2cx7d\\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\IPC_AD~1\AppData\Local\Temp\pip-tqzdkhaj-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\twisted
copying src\twisted\copyright.py -> build\lib.win-amd64-3.6\twisted
copying src\twisted\plugin.py -> build\lib.win-amd64-3.6\twisted
copying src\twisted\_version.py -> build\lib.win-amd64-3.6\twisted
copying src\twisted\__init__.py -> build\lib.win-amd64-3.6\twisted
.
.
.
.
copying src\twisted\words\xish\xpathparser.g -> build\lib.win-amd64-3.6\twisted\words\xish
running build_ext
building 'twisted.test.raiser' 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
----------------------------------------
I have tried to install twisted by from .wl as
pip install Twisted-17.9.0-cp37-cp37m-win_amd64.whl
and
pip install Twisted-17.9.0-cp27-cp27m-win32.whl
both failed with error:
Twisted-17.9.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
I am using Windows 7 64
While installing from unofficial python wheels you need to find appropriate wheel for your python and os.
This looks like the naming convention.
module (mod. ver.) (py ver.) os(32 or 64)
↓ ↓ ↓ ↓
Twisted-17.9.0-cp36-cp36m-win_amd64.whl
I have solved the issue by manually downloading and installing "Twisted" library with following command.
pip install Twisted-17.9.0-cp37-cp37m-win_amd64.whl
Thanks. This worked for me too. Was getting the same error.
Manually downloaded and installed Twisted 17.9.0 using
pip install Twisted-17.9.0-cp36-cp36m-win32.whl
and it worked.

Categories

Resources