How to solve error when installing auto-py-to-exe? - python

I am trying to pip install auto-py-to-exe, but got following error.
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for
Visual Studio": https://visualstudio.microsoft.com/downloads/
I also
tried to download wheel or .gz file and install but it gave me the same error.
Here the full error message goes.
C:\Users\soham>pip install C:\Users\soham\Downloads\auto-py-to-exe-2.7.8
Processing c:\users\soham\downloads\auto-py-to-exe-2.7.8
Collecting Eel==0.12.4
Using cached Eel-0.12.4.tar.gz (15 kB)
Requirement already satisfied: pyinstaller>=3.4 in c:\users\soham\appdata\local\programs\python\python39\lib\site-packages (from auto-py-to-exe==2.7.8) (4.0)
Collecting bottle
Using cached bottle-0.12.18-py3-none-any.whl (89 kB)
Collecting bottle-websocket
Using cached bottle-websocket-0.2.9.tar.gz (2.0 kB)
Requirement already satisfied: future in c:\users\soham\appdata\local\programs\python\python39\lib\site-packages (from Eel==0.12.4->auto-py-to-exe==2.7.8) (0.18.2)
Collecting whichcraft
Using cached whichcraft-0.6.1-py2.py3-none-any.whl (5.2 kB)
Requirement already satisfied: pywin32-ctypes>=0.2.0; sys_platform == "win32" in c:\users\soham\appdata\local\programs\python\python39\lib\site-packages (from pyinstaller>=3.4->auto-py-to-exe==2.7.8) (0.2.0)
Requirement already satisfied: altgraph in c:\users\soham\appdata\local\programs\python\python39\lib\site-packages (from pyinstaller>=3.4->auto-py-to-exe==2.7.8) (0.17)
Requirement already satisfied: pefile>=2017.8.1; sys_platform == "win32" in c:\users\soham\appdata\local\programs\python\python39\lib\site-packages (from pyinstaller>=3.4->auto-py-to-exe==2.7.8) (2019.4.18)
Requirement already satisfied: setuptools in c:\users\soham\appdata\local\programs\python\python39\lib\site-packages (from pyinstaller>=3.4->auto-py-to-exe==2.7.8) (49.2.1)
Requirement already satisfied: pyinstaller-hooks-contrib>=2020.6 in c:\users\soham\appdata\local\programs\python\python39\lib\site-packages (from pyinstaller>=3.4->auto-py-to-exe==2.7.8) (2020.9)
Collecting gevent-websocket
Using cached gevent_websocket-0.10.1-py3-none-any.whl (22 kB)
Collecting gevent
Using cached gevent-20.9.0.tar.gz (5.8 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\soham\appdata\local\programs\python\python39\python.exe' 'c:\users\soham\appdata\local\programs\python\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\soham\AppData\Local\Temp\pip-build-env-qcvagi7m\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 40.8.0' wheel 'Cython >= 3.0a5' 'cffi >= 1.12.3 ; platform_python_implementation == '"'"'CPython'"'"'' 'greenlet >= 0.4.17 ; platform_python_implementation == '"'"'CPython'"'"''
cwd: None
Complete output (27 lines):
Collecting setuptools>=40.8.0
Using cached setuptools-50.3.2-py3-none-any.whl (785 kB)
Collecting wheel
Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting Cython>=3.0a5
Using cached Cython-3.0a6-py2.py3-none-any.whl (1.0 MB)
Collecting cffi>=1.12.3
Using cached cffi-1.14.3-cp39-cp39-win_amd64.whl (179 kB)
Collecting greenlet>=0.4.17
Using cached greenlet-0.4.17.tar.gz (61 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Using legacy 'setup.py install' for greenlet, since package 'wheel' is not installed.
Installing collected packages: setuptools, wheel, Cython, pycparser, cffi, greenlet
Running setup.py install for greenlet: started
Running setup.py install for greenlet: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\users\soham\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\soham\\AppData\\Local\\Temp\\pip-install-gvck6c55\\greenlet\\setup.py'"'"'; __file__='"'"'C:\\Users\\soham\\AppData\\Local\\Temp\\pip-install-gvck6c55\\greenlet\\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\soham\AppData\Local\Temp\pip-record-0sbse4fp\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\soham\AppData\Local\Temp\pip-build-env-qcvagi7m\overlay' --compile --install-headers 'C:\Users\soham\AppData\Local\Temp\pip-build-env-qcvagi7m\overlay\Include\greenlet'
cwd: C:\Users\soham\AppData\Local\Temp\pip-install-gvck6c55\greenlet\
Complete output (5 lines):
running install
running build
running build_ext
building 'greenlet' 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\soham\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\soham\\AppData\\Local\\Temp\\pip-install-gvck6c55\\greenlet\\setup.py'"'"'; __file__='"'"'C:\\Users\\soham\\AppData\\Local\\Temp\\pip-install-gvck6c55\\greenlet\\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\soham\AppData\Local\Temp\pip-record-0sbse4fp\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\soham\AppData\Local\Temp\pip-build-env-qcvagi7m\overlay' --compile --install-headers 'C:\Users\soham\AppData\Local\Temp\pip-build-env-qcvagi7m\overlay\Include\greenlet' Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\soham\appdata\local\programs\python\python39\python.exe' 'c:\users\soham\appdata\local\programs\python\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\soham\AppData\Local\Temp\pip-build-env-qcvagi7m\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 40.8.0' wheel 'Cython >= 3.0a5' 'cffi >= 1.12.3 ; platform_python_implementation == '"'"'CPython'"'"'' 'greenlet >= 0.4.17 ; platform_python_implementation == '"'"'CPython'"'"'' Check the logs for full command output.
Thank you in advance.

Try to install Microsoft Visual C++ 14.0.
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio":
https://visualstudio.microsoft.com/downloads/
You should go on Visual C++ 2015 Build Tools to install Visual C++ 14.0 without installing Visual Studio.

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/

ModuleNotFoundError: No module named 'pyttsx3'

I am running a program in Sublime text and I get the error:
ModuleNotFoundError: No module named 'pyttsx3'
I opened Command Prompt and typed in: pip install pyttsx3 and that's what I get
Collecting pyttsx3
Using cached pyttsx3-2.90-py3-none-any.whl (39 kB)
Collecting comtypes; platform_system == "Windows"
Using cached comtypes-1.1.7.zip (180 kB)
Requirement already satisfied: pywin32; platform_system == "Windows" in c:\users\claud\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pyttsx3) (228)
Requirement already satisfied: pypiwin32; platform_system == "Windows" in c:\users\claud\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pyttsx3) (223)
Using legacy 'setup.py install' for comtypes, since package 'wheel' is not installed.
Installing collected packages: comtypes, pyttsx3
Running setup.py install for comtypes ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\claud\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\claud\\AppData\\Local\\Temp\\pip-install-zam0bo68\\comtypes\\setup.py'"'"'; __file__='"'"'C:\\Users\\claud\\AppData\\Local\\Temp\\pip-install-zam0bo68\\comtypes\\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\claud\AppData\Local\Temp\pip-record-zh7s3m6p\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\claud\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\comtypes'
cwd: C:\Users\claud\AppData\Local\Temp\pip-install-zam0bo68\comtypes\
I did fix it.
First I upgraded the version of pip by going here
C:\Users\claud\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe
And followed this instructions:
https://pip.pypa.io/en/stable/installing/
After that it was easy to do pip install pyttsx3

problem while installing gnuhealth client on centos 7

when i run the command ;
pip3 install --user --upgrade gnuhealth-client
it shows the same error msg everytime
gnuhealth#ghealth:~ $ pip3 install --user --upgrade gnuhealth-client
Collecting gnuhealth-client
Using cached gnuhealth-client-3.6.9.tar.gz (700 kB)
Collecting pycairo
Using cached pycairo-1.19.1.tar.gz (205 kB)
Requirement already satisfied, skipping upgrade: python-dateutil in ./.local/lib/python3.6/site-packages (from gnuhealth-client) (2.8.1)
Collecting PyGObject
Using cached PyGObject-3.36.1.tar.gz (716 kB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /home/gnuhealth/.local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-w04za2un/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo
cwd: None
Complete output (31 lines):
Collecting setuptools
Using cached setuptools-49.6.0-py3-none-any.whl (803 kB)
Collecting wheel
Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting pycairo
Using cached pycairo-1.19.1.tar.gz (205 kB)
Using legacy 'setup.py install' for pycairo, since package 'wheel' is not installed.
Installing collected packages: setuptools, wheel, pycairo
Running setup.py install for pycairo: started
Running setup.py install for pycairo: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ax6ip1o2/pycairo/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ax6ip1o2/pycairo/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-2p1yavr2/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-w04za2un/overlay --compile --install-headers /tmp/pip-build-env-w04za2un/overlay/include/python3.6m/pycairo
cwd: /tmp/pip-install-ax6ip1o2/pycairo/
Complete output (15 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/cairo
copying cairo/__init__.py -> build/lib.linux-x86_64-3.6/cairo
copying cairo/__init__.pyi -> build/lib.linux-x86_64-3.6/cairo
copying cairo/py.typed -> build/lib.linux-x86_64-3.6/cairo
running build_ext
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.13.1']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ax6ip1o2/pycairo/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ax6ip1o2/pycairo/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-2p1yavr2/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-w04za2un/overlay --compile --install-headers /tmp/pip-build-env-w04za2un/overlay/include/python3.6m/pycairo Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /home/gnuhealth/.local/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-w04za2un/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel pycairo Check the logs for full command output.
what should i do ?
UPDATED ANSWER
It's PyGObject that is failing
try
sudo yum install gcc gobject-introspection-devel cairo-devel pkg-config python3-devel gtk3 cairo-gobject-devel
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig
before attempting the pip install
This actually worked for me on Centos7

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

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