below are my specs
My PC is running Windows 11 V. 21H2. I am using Python 3.10. I use Pycharm 2021.2.3. I am using PIP 21.3.1 to install python libraries. To the best of my knowledge, everything is up to date.
I'm using the pip install psutil funtion in the terminal. I was able to initialize the install and begin the download, but it failed with a lot of errors.
I then tried to run cmd /k pip install --no-binary :all: psutil per recomendation of the python website. Still no luck, eact same errors.
The install beings very normal.
Collecting psutil
Using cached psutil-5.8.0.tar.gz (470 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Using legacy 'setup.py install' for psutil, since package 'wheel' is not installed.
Installing collected packages: psutil
Running setup.py install for psutil: started
Running setup.py install for psutil: finished with status 'error'
However, it runs into an error and spits this out.
ERROR: Command errored out with exit status 1:
command: 'C:\Users\elton\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\elton\\AppData\\Local\\Temp\\pip-install-fi8xi6rq\\psutil_87b30645105b42978bc30b4b75398dbe\\setup.py'"'"'; __file__='"'"'C:\\Users\\elton\\AppData\\Local\\Temp\\pip-install-fi8xi6rq\\psutil_87b30645105b42978bc30b4b75398dbe\\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\elton\AppData\Local\Temp\pip-record-cr321z3l\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\elton\AppData\Local\Programs\Python\Python310\Include\psutil'
cwd: C:\Users\elton\AppData\Local\Temp\pip-install-fi8xi6rq\psutil_87b30645105b42978bc30b4b75398dbe\
Complete output (40 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\psutil
copying psutil\_common.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_compat.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_psaix.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_psbsd.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_pslinux.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_psosx.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_psposix.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_pssunos.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_pswindows.py -> build\lib.win-amd64-3.10\psutil
copying psutil\__init__.py -> build\lib.win-amd64-3.10\psutil
creating build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\runner.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_aix.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_bsd.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_connections.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_contracts.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_linux.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_memleaks.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_misc.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_osx.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_posix.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_process.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_sunos.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_system.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_testutils.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_unicode.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_windows.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\__init__.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\__main__.py -> build\lib.win-amd64-3.10\psutil\tests
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'psutil._psutil_windows' 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/
---------------------------------------
I checked my installed versions of Microsoft Visual C++ and my most recent version is 14.0.23506.0. This leads me to believe that I'm up to date.
Then I receive another error
Command errored out with exit status 1:
'C:\Users\elton\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io,
os, sys, setuptools, tokenize; sys.argv[0] =
'"'"'C:\\Users\\elton\\AppData\\Local\\Temp\\pip-install-
fi8xi6rq\\psutil_87b30645105b42978bc30b4b75398dbe\\setup.py'"'"';
__file__='"'"'C:\\Users\\elton\\AppData\\Local\\Temp\\pip-install-
fi8xi6rq\\psutil_87b30645105b42978bc30b4b75398dbe\\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\elton\AppData\Local\Temp\pip-record-cr321z3l\install-record.txt' --single-
version-externally-managed --compile --install-headers
'C:\Users\elton\AppData\Local\Programs\Python\Python310\Include\psutil' Check the logs
for full command output.
I check the C:\Users\elton\AppData\Local\Programs\Python\Python310\Include\psutil file location to find the log but it is not there.
I have checked multiple sources looking for answers about the Visual C++ and I see that its common for people to have this error when multiple versions of python installed but I only have one version installed.
Any help would be greatly appreciated.
This worked for me:
https://blog.hqcodeshop.fi/archives/499-Python-Windows-Pip-requiring-Build-Tools-for-Visual-Studio.html
Get the 2017 version of the build tools then explicitly ask to install that specific version "MSVC v140 - VS 2015 C++ build tools (v14.00)" of the build tools under "Individual Components".
I'm not sure if it must be from the 2017 version. I would hope that any version which has that version of build tools should work, but given all the failed answers, maybe it has to be exactly that one.
Related
pip install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-2.1.1.tar.gz (88 kB)
Preparing metadata (setup.py) .. done
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py) .. error
ERROR: Command errored out with exit status 1:
command: 'c:\users\hp\appdata\local\programs\python\python36\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\HP\\AppD
ata\\Local\\Temp\\pip-install-mmb7531p\\mysqlclient_a141c7c0a933439fbe19807e877c7cc2\\setup.py'"'"'; __file__='"'"'C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install
-mmb7531p\\mysqlclient_a141c7c0a933439fbe19807e877c7cc2\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.St
ringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'
))' bdist_wheel -d 'C:\Users\HP\AppData\Local\Temp\pip-wheel-44gqcvbi'
cwd: C:\Users\HP\AppData\Local\Temp\pip-install-mmb7531p\mysqlclient_a141c7c0a933439fbe19807e877c7cc2\
Complete output (25 lines):
c:\users\hp\appdata\local\programs\python\python36\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\_exceptions.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.6\MySQLdb
creating build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.6\MySQLdb\constants
running build_ext
building 'MySQLdb._mysql' 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
----------------------------------------
ERROR: Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\hp\appdata\local\programs\python\python36\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\HP\\Ap
pData\\Local\\Temp\\pip-install-mmb7531p\\mysqlclient_a141c7c0a933439fbe19807e877c7cc2\\setup.py'"'"'; __file__='"'"'C:\\Users\\HP\\AppData\\Local\\Temp\\pip-insta
ll-mmb7531p\\mysqlclient_a141c7c0a933439fbe19807e877c7cc2\\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\HP\AppData\Local\Temp\pip-record-ylfwp41x\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\
users\hp\appdata\local\programs\python\python36\Include\mysqlclient'
cwd: C:\Users\HP\AppData\Local\Temp\pip-install-mmb7531p\mysqlclient_a141c7c0a933439fbe19807e877c7cc2\
Complete output (25 lines):
c:\users\hp\appdata\local\programs\python\python36\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\_exceptions.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.6\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.6\MySQLdb
creating build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.6\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.6\MySQLdb\constants
running build_ext
building 'MySQLdb._mysql' 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
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\hp\appdata\local\programs\python\python36\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys
.argv[0] = '"'"'C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-mmb7531p\\mysqlclient_a141c7c0a933439fbe19807e877c7cc2\\setup.py'"'"'; __file__='"'"'C:\\Users\\HP
\\AppData\\Local\\Temp\\pip-install-mmb7531p\\mysqlclient_a141c7c0a933439fbe19807e877c7cc2\\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(com
pile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\HP\AppData\Local\Temp\pip-record-ylfwp41x\install-record.txt' --single-version-externally-managed
--compile --install-headers 'c:\users\hp\appdata\local\programs\python\python36\Include\mysqlclient' Check the logs for full command output.
I'am trying to install mysqlclient in Pycharm. But i couldn't,its showing me these errors.There are errors while buliding wheel for mysqlclient. Django version is 3.2.18. Pip version is 21.3.1. Does this error happens due to mismatch of versions of pip and mysqlclient? ............................................................................................................
why don't use the MSI setup file to install it. it's okay with pip, I will check what is the problem, but for the time being go here & install: https://dev.mysql.com/downloads/installer/
MySQL client installs the full suite in your machine (including the CLI). You said about PyCharm, it is going to use the CLI. So just install the full suite setup.
See, I just did this,
PS C:\Users\Archisman> pip install mysqlclient
Collecting mysqlclient
Downloading mysqlclient-2.1.1-cp310-cp310-win_amd64.whl (178 kB)
---------------------------------------- 178.4/178.4 kB 10.5 MB/s eta 0:00:00
Installing collected packages: mysqlclient
Successfully installed mysqlclient-2.1.1
[notice] A new release of pip available: 22.3.1 -> 23.0.1
[notice] To update, run: C:\Users\Archisman\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip
PS C:\Users\Archisman>
I had installed MySQL through the setup file & works everywhere. So, just download the setup & install it. pip install mysqlclient may leave some of the packages to be installed & that's causing the error.
Also don't forget that MySQL needs MS Visual Studio Build Tools. So, it's better run the setup.
UPDATE
Found this in your Shell:
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
Just what I guessed.
As the error messages indicate, The problem could be the "Microsoft Visual C++ Build Tools". So try installing that depandency.
I've been trying to install igraph using pip but it keeps failing.
I get the following error:
Using cached igraph-0.9.8.tar.gz (3.6 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: texttable>=1.6.2 in c:\msys64\mingw64\lib\python3.9\site-packages (from igraph) (1.6.4)
Building wheels for collected packages: igraph
Building wheel for igraph (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\msys64\mingw64\bin\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-nrm8rlun\\igraph_85a609eb9b2b457aa62af06569648cc8\\setup.py'"'"'; __file__='"'"'C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-nrm8rlun\\igraph_85a609eb9b2b457aa62af06569648cc8\\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\HP\AppData\Local\Temp\pip-wheel-6pxfcwpb'
cwd: C:\Users\HP\AppData\Local\Temp\pip-install-nrm8rlun\igraph_85a609eb9b2b457aa62af06569648cc8\
Complete output (65 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.mingw_x86_64-3.9
creating build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\clustering.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\configuration.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\cut.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\datatypes.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\formula.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\layout.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\matching.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\operators.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\sparse_matrix.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\statistics.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\summary.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\utils.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\version.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\__init__.py -> build\lib.mingw_x86_64-3.9\igraph
creating build\lib.mingw_x86_64-3.9\igraph\app
copying src\igraph\app\shell.py -> build\lib.mingw_x86_64-3.9\igraph\app
copying src\igraph\app\__init__.py -> build\lib.mingw_x86_64-3.9\igraph\app
creating build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\baseclasses.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\colors.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\coord.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\edge.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\graph.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\metamagic.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\shapes.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\text.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\utils.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\vertex.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\__init__.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
creating build\lib.mingw_x86_64-3.9\igraph\remote
copying src\igraph\remote\gephi.py -> build\lib.mingw_x86_64-3.9\igraph\remote
copying src\igraph\remote\__init__.py -> build\lib.mingw_x86_64-3.9\igraph\remote
running build_ext
running build_c_core
-- Building for: NMake Makefiles
-- Setting build type to 'Release' as none was specified.
-- Version number: 0.9.4-24-gb29e741ea
CMake Error at CMakeLists.txt:30 (project):
Running
'nmake' '-?'
failed with:
The system cannot find the file specified
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/HP/AppData/Local/Temp/pip-install-nrm8rlun/igraph_85a609eb9b2b457aa62af06569648cc8/vendor/build/igraph/CMakeFiles/CMakeOutput.log".
We are going to build the C core of igraph.
Source folder: vendor\source\igraph
Build folder: vendor\build\igraph
Install folder: vendor\install\igraph
Configuring build...
Build failed for the C core of igraph.
----------------------------------------
ERROR: Failed building wheel for igraph
Running setup.py clean for igraph
Failed to build igraph
Installing collected packages: igraph
Running setup.py install for igraph ... error
ERROR: Command errored out with exit status 1:
command: 'c:\msys64\mingw64\bin\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-nrm8rlun\\igraph_85a609eb9b2b457aa62af06569648cc8\\setup.py'"'"'; __file__='"'"'C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-nrm8rlun\\igraph_85a609eb9b2b457aa62af06569648cc8\\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\HP\AppData\Local\Temp\pip-record-vzu8m8eh\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\msys64\mingw64\include\python3.9\igraph'
cwd: C:\Users\HP\AppData\Local\Temp\pip-install-nrm8rlun\igraph_85a609eb9b2b457aa62af06569648cc8\
Complete output (65 lines):
running install
C:\msys64\mingw64\lib\python3.9\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
creating build\lib.mingw_x86_64-3.9
creating build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\clustering.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\configuration.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\cut.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\datatypes.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\formula.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\layout.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\matching.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\operators.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\sparse_matrix.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\statistics.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\summary.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\utils.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\version.py -> build\lib.mingw_x86_64-3.9\igraph
copying src\igraph\__init__.py -> build\lib.mingw_x86_64-3.9\igraph
creating build\lib.mingw_x86_64-3.9\igraph\app
copying src\igraph\app\shell.py -> build\lib.mingw_x86_64-3.9\igraph\app
copying src\igraph\app\__init__.py -> build\lib.mingw_x86_64-3.9\igraph\app
creating build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\baseclasses.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\colors.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\coord.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\edge.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\graph.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\metamagic.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\shapes.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\text.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\utils.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\vertex.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
copying src\igraph\drawing\__init__.py -> build\lib.mingw_x86_64-3.9\igraph\drawing
creating build\lib.mingw_x86_64-3.9\igraph\remote
copying src\igraph\remote\gephi.py -> build\lib.mingw_x86_64-3.9\igraph\remote
copying src\igraph\remote\__init__.py -> build\lib.mingw_x86_64-3.9\igraph\remote
running build_ext
running build_c_core
-- Version number: 0.9.4-24-gb29e741ea
CMake Error at CMakeLists.txt:30 (project):
Running
'nmake' '-?'
failed with:
The system cannot find the file specified
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/HP/AppData/Local/Temp/pip-install-nrm8rlun/igraph_85a609eb9b2b457aa62af06569648cc8/vendor/build/igraph/CMakeFiles/CMakeOutput.log".
We are going to build the C core of igraph.
Source folder: vendor\source\igraph
Build folder: vendor\build\igraph
Install folder: vendor\install\igraph
Configuring build...
Build failed for the C core of igraph.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\msys64\mingw64\bin\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-nrm8rlun\\igraph_85a609eb9b2b457aa62af06569648cc8\\setup.py'"'"'; __file__='"'"'C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-nrm8rlun\\igraph_85a609eb9b2b457aa62af06569648cc8\\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\HP\AppData\Local\Temp\pip-record-vzu8m8eh\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\msys64\mingw64\include\python3.9\igraph' Check the logs for full command output.
The problem has something to do with building the C core of igraph. What steps do I take to resolve this error?
My system info, if relevant:
HP Pavillion 14
Intel Core i7-1065G7 CPU
Windows 10 Home 21H1 64bit
Python 3.9.7
pip 21.3.1
tl;dr Use the official Python distribution for Windows, or use Anaconda.
You should not use python-igraph with the Python included in MSYS2 unless you have a very good reason. This Python is not compatible with the official Python distribution on Windows, which means that you will not be able to install binary wheels from PyPI, and will need to compile everything from source. As you discovered, that is not always trivial.
If you have a truly good reason to use this Python with igraph, the simplest way is the following:
Make sure you are using the appropriate subsystem (i.e. you launch the correct terminal). Here I am assuming you are using the MinGW64 one.
Install the igraph C library from MSYS2: pacman -S mingw-w64-x86_64-igraph
Make sure you are using pip from MSYS2: pacman -S mingw-w64-x86_64-python-pip
Install texttable: pip install texttable
Install igraph, and link to the existing C library: pip install igraph --install-option="--use-pkg-config"
By going this route, you are treading in uncharted waters. Expect problems that you will need to resolve on your own.
I'm want to create an app that can manage the volume of the pc, I found online "pycaw" and I tried to install it but when I run the command this is the result
C:\Windows\system32>pip install pycaw
Collecting pycaw
Using cached pycaw-20181226.tar.gz (5.7 kB)
Preparing metadata (setup.py) ... done
Collecting comtypes
Using cached comtypes-1.1.10.tar.gz (145 kB)
Preparing metadata (setup.py) ... done
Collecting enum34
Using cached enum34-1.1.10-py3-none-any.whl (11 kB)
Collecting psutil
Using cached psutil-5.8.0.tar.gz (470 kB)
Preparing metadata (setup.py) ... done
Collecting future
Using cached future-0.18.2.tar.gz (829 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for pycaw, since package 'wheel' is not installed.
Using legacy 'setup.py install' for comtypes, since package 'wheel' is not installed.
Using legacy 'setup.py install' for future, since package 'wheel' is not installed.
Using legacy 'setup.py install' for psutil, since package 'wheel' is not installed.
Installing collected packages: psutil, future, enum34, comtypes, pycaw
Running setup.py install for psutil ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\kevin\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kevin\\AppData\\Local\\Temp\\pip-install-s9ybt31o\\psutil_59ec22fef2094e26b1d24300f2b42416\\setup.py'"'"'; __file__='"'"'C:\\Users\\kevin\\AppData\\Local\\Temp\\pip-install-s9ybt31o\\psutil_59ec22fef2094e26b1d24300f2b42416\\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\kevin\AppData\Local\Temp\pip-record-h6emejwp\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\kevin\AppData\Local\Programs\Python\Python310\Include\psutil'
cwd: C:\Users\kevin\AppData\Local\Temp\pip-install-s9ybt31o\psutil_59ec22fef2094e26b1d24300f2b42416\
Complete output (38 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\psutil
copying psutil\_common.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_compat.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_psaix.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_psbsd.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_pslinux.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_psosx.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_psposix.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_pssunos.py -> build\lib.win-amd64-3.10\psutil
copying psutil\_pswindows.py -> build\lib.win-amd64-3.10\psutil
copying psutil\__init__.py -> build\lib.win-amd64-3.10\psutil
creating build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\runner.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_aix.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_bsd.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_connections.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_contracts.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_linux.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_memleaks.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_misc.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_osx.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_posix.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_process.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_sunos.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_system.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_testutils.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_unicode.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\test_windows.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\__init__.py -> build\lib.win-amd64-3.10\psutil\tests
copying psutil\tests\__main__.py -> build\lib.win-amd64-3.10\psutil\tests
running build_ext
building 'psutil._psutil_windows' 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\kevin\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kevin\\AppData\\Local\\Temp\\pip-install-s9ybt31o\\psutil_59ec22fef2094e26b1d24300f2b42416\\setup.py'"'"'; __file__='"'"'C:\\Users\\kevin\\AppData\\Local\\Temp\\pip-install-s9ybt31o\\psutil_59ec22fef2094e26b1d24300f2b42416\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', ope`n)(__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\kevin\AppData\Local\Temp\pip-record-h6emejwp\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\kevin\AppData\Local\Programs\Python\Python310\Include\psutil' Check the logs for full command output.`
I tried to uninstall python and reinstalling it, what should I do?
I should have all installed like visual studio build tools like I saw on another post
The error you're getting is telling you how to solve it:
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/
So, just install C++ Build Tools from the link it's telling you.
You need only to install a visual c++ libraries.
Try to download it from
https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-160
without build tools. Pick x64 if you had a 64-bit Windows OS or x86 for 32-bit Windows OS.
On Windows 10. I am testing someone's code which has the following imports:
import torch.nn as nn
import torchsparse.nn as spnn
from torchsparse.point_tensor import PointTensor
So on my machine I successfully installed via
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-1.9.0+cu111.html
As I have CUDA 11.1. However, there seems to be a syntax difference, as the above imports give:
import torchsparse.nn as spnn
ModuleNotFoundError: No module named 'torchsparse'
I found that when I am in Python I can do the following:
>>> import torchsparse
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'torchsparse'
>>> import torchsparse.nn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'torchsparse'
>>> import torch_sparse
>>> import torch_sparse.nn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'torch_sparse.nn'
>>>
So I can only import torch_sparse. Does anyone know how I can get the equivalent imports to test my buddy's code? Much appreciated.
---- EDIT ----
Trying Ivan's answer, I got the following:
pip install --upgrade git+https://github.com/mit-han-lab/torchsparse.git#v1.4.0
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
Collecting git+https://github.com/mit-han-lab/torchsparse.git#v1.4.0
Cloning https://github.com/mit-han-lab/torchsparse.git (to revision v1.4.0) to c:\users\iijds\appdata\local\temp\pip-req-build-gvmcjx1m
Running command git clone -q https://github.com/mit-han-lab/torchsparse.git 'C:\Users\iiJDS\AppData\Local\Temp\pip-req-build-gvmcjx1m'
Running command git checkout -q 74099d10a51c71c14318bce63d6421f698b24f24
Resolved https://github.com/mit-han-lab/torchsparse.git to commit 74099d10a51c71c14318bce63d6421f698b24f24
Building wheels for collected packages: torchsparse
Building wheel for torchsparse (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\iiJDS\\AppData\\Local\\Temp\\pip-req-build-gvmcjx1m\\setup.py'"'"'; __file__='"'"'C:\\Users\\iiJDS\\AppData\\Local\\Temp\\pip-req-build-gvmcjx1m\\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\iiJDS\AppData\Local\Temp\pip-wheel-rz9wo9lc'
cwd: C:\Users\iiJDS\AppData\Local\Temp\pip-req-build-gvmcjx1m\
Complete output (53 lines):
running bdist_wheel
c:\python39\lib\site-packages\torch\utils\cpp_extension.py:370: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\torchsparse
copying torchsparse\operators.py -> build\lib.win-amd64-3.9\torchsparse
copying torchsparse\tensor.py -> build\lib.win-amd64-3.9\torchsparse
copying torchsparse\version.py -> build\lib.win-amd64-3.9\torchsparse
copying torchsparse\__init__.py -> build\lib.win-amd64-3.9\torchsparse
creating build\lib.win-amd64-3.9\torchsparse\nn
copying torchsparse\nn\__init__.py -> build\lib.win-amd64-3.9\torchsparse\nn
creating build\lib.win-amd64-3.9\torchsparse\utils
copying torchsparse\utils\collate.py -> build\lib.win-amd64-3.9\torchsparse\utils
copying torchsparse\utils\quantize.py -> build\lib.win-amd64-3.9\torchsparse\utils
copying torchsparse\utils\utils.py -> build\lib.win-amd64-3.9\torchsparse\utils
copying torchsparse\utils\__init__.py -> build\lib.win-amd64-3.9\torchsparse\utils
creating build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\activation.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\conv.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\count.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\crop.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\devoxelize.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\downsample.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\hash.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\pooling.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\query.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\voxelize.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\__init__.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
creating build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\activation.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\bev.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\conv.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\crop.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\norm.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\pooling.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\__init__.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
creating build\lib.win-amd64-3.9\torchsparse\nn\utils
copying torchsparse\nn\utils\apply.py -> build\lib.win-amd64-3.9\torchsparse\nn\utils
copying torchsparse\nn\utils\kernel.py -> build\lib.win-amd64-3.9\torchsparse\nn\utils
copying torchsparse\nn\utils\__init__.py -> build\lib.win-amd64-3.9\torchsparse\nn\utils
running build_ext
c:\python39\lib\site-packages\torch\utils\cpp_extension.py:305: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building 'torchsparse.backend' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "c:\python39\lib\site-packages\colorama\ansitowin32.py", line 59, in closed
return stream.closed
ValueError: underlying buffer has been detached
----------------------------------------
ERROR: Failed building wheel for torchsparse
Running setup.py clean for torchsparse
Failed to build torchsparse
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
Installing collected packages: torchsparse
Running setup.py install for torchsparse ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\iiJDS\\AppData\\Local\\Temp\\pip-req-build-gvmcjx1m\\setup.py'"'"'; __file__='"'"'C:\\Users\\iiJDS\\AppData\\Local\\Temp\\pip-req-build-gvmcjx1m\\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\iiJDS\AppData\Local\Temp\pip-record-p7zn1m6h\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\torchsparse'
cwd: C:\Users\iiJDS\AppData\Local\Temp\pip-req-build-gvmcjx1m\
Complete output (53 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\torchsparse
copying torchsparse\operators.py -> build\lib.win-amd64-3.9\torchsparse
copying torchsparse\tensor.py -> build\lib.win-amd64-3.9\torchsparse
copying torchsparse\version.py -> build\lib.win-amd64-3.9\torchsparse
copying torchsparse\__init__.py -> build\lib.win-amd64-3.9\torchsparse
creating build\lib.win-amd64-3.9\torchsparse\nn
copying torchsparse\nn\__init__.py -> build\lib.win-amd64-3.9\torchsparse\nn
creating build\lib.win-amd64-3.9\torchsparse\utils
copying torchsparse\utils\collate.py -> build\lib.win-amd64-3.9\torchsparse\utils
copying torchsparse\utils\quantize.py -> build\lib.win-amd64-3.9\torchsparse\utils
copying torchsparse\utils\utils.py -> build\lib.win-amd64-3.9\torchsparse\utils
copying torchsparse\utils\__init__.py -> build\lib.win-amd64-3.9\torchsparse\utils
creating build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\activation.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\conv.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\count.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\crop.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\devoxelize.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\downsample.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\hash.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\pooling.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\query.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\voxelize.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
copying torchsparse\nn\functional\__init__.py -> build\lib.win-amd64-3.9\torchsparse\nn\functional
creating build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\activation.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\bev.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\conv.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\crop.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\norm.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\pooling.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
copying torchsparse\nn\modules\__init__.py -> build\lib.win-amd64-3.9\torchsparse\nn\modules
creating build\lib.win-amd64-3.9\torchsparse\nn\utils
copying torchsparse\nn\utils\apply.py -> build\lib.win-amd64-3.9\torchsparse\nn\utils
copying torchsparse\nn\utils\kernel.py -> build\lib.win-amd64-3.9\torchsparse\nn\utils
copying torchsparse\nn\utils\__init__.py -> build\lib.win-amd64-3.9\torchsparse\nn\utils
running build_ext
c:\python39\lib\site-packages\torch\utils\cpp_extension.py:370: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
c:\python39\lib\site-packages\torch\utils\cpp_extension.py:305: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building 'torchsparse.backend' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "c:\python39\lib\site-packages\colorama\ansitowin32.py", line 59, in closed
return stream.closed
ValueError: underlying buffer has been detached
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\iiJDS\\AppData\\Local\\Temp\\pip-req-build-gvmcjx1m\\setup.py'"'"'; __file__='"'"'C:\\Users\\iiJDS\\AppData\\Local\\Temp\\pip-req-build-gvmcjx1m\\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\iiJDS\AppData\Local\Temp\pip-record-p7zn1m6h\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\torchsparse' Check the logs for full command output.
It appears the package you are trying to import comes from this Github repo, which is different to the package you installed: torch-sparse you tried using. You should try with this instead:
pip install --upgrade git+https://github.com/mit-han-lab/torchsparse.git#v1.4.0
Also, you can uninstall the other one with:
pip uninstall torch-sparse
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\uaahacker\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\uaahacker\AppData\Local\Temp\pip-install-icjkjmap\mysqlclient_8b5f49f509624395ab7dd2c4d4a21457\setup.py'"'"'; file='"'"'C:\Users\uaahacker\AppData\Local\Temp\pip-install-icjkjmap\mysqlclient_8b5f49f509624395ab7dd2c4d4a21457\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\uaahacker\AppData\Local\Temp\pip-record-62876lx5\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\uaahacker\appdata\local\programs\python\python38-32\Include\mysqlclient'
cwd: C:\Users\uaahacker\AppData\Local\Temp\pip-install-icjkjmap\mysqlclient_8b5f49f509624395ab7dd2c4d4a21457
Complete output (23 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.8
creating build\lib.win32-3.8\MySQLdb
copying MySQLdb_init_.py -> build\lib.win32-3.8\MySQLdb
copying MySQLdb_exceptions.py -> build\lib.win32-3.8\MySQLdb
copying MySQLdb\connections.py -> build\lib.win32-3.8\MySQLdb
copying MySQLdb\converters.py -> build\lib.win32-3.8\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win32-3.8\MySQLdb
copying MySQLdb\release.py -> build\lib.win32-3.8\MySQLdb
copying MySQLdb\times.py -> build\lib.win32-3.8\MySQLdb
creating build\lib.win32-3.8\MySQLdb\constants
copying MySQLdb\constants_init_.py -> build\lib.win32-3.8\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.8\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win32-3.8\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win32-3.8\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.8\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.8\MySQLdb\constants
running build_ext
building 'MySQLdb._mysql' 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\uaahacker\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\uaahacker\AppData\Local\Temp\pip-install-icjkjmap\mysqlclient_8b5f49f509624395ab7dd2c4d4a21457\setup.py'"'"'; file='"'"'C:\Users\uaahacker\AppData\Local\Temp\pip-install-icjkjmap\mysqlclient_8b5f49f509624395ab7dd2c4d4a21457\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\uaahacker\AppData\Local\Temp\pip-record-62876lx5\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\uaahacker\appdata\local\programs\python\python38-32\Include\mysqlclient' Check the logs for full command output.
There is no package on pypi for the 32-bit version of Python. Only for 64-bit Python.
And if you install mysqlclient from there, naturally, sources that need to be compiled will be installed.
And for 32-bit Python, the compiled package is available at https://www.lfd.uci.edu/~gohlke/pythonlibs/.
it is literally telling you how to solve the ptoblem in the error
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/
just download visualstudio build tools