When I run pip install pdfminer using Python 2.7 on Windows Server 2012, I got the following error :
Running setup.py install for pdfminer ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\admini~1\\appdata\\local\\temp\\2\\pip-install-xgbxsi\\pdfminer\\setup.py'"'"'; __file__='"'"'c:\\users\\admin
i~1\\appdata\\local\\temp\\2\\pip-install-xgbxsi\\pdfminer\\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\admini~1\appdata\local\temp\2\pip-record-mdl997\install-record.txt' --single-version-externally-managed --compile
cwd: c:\users\admini~1\appdata\local\temp\2\pip-install-xgbxsi\pdfminer\
Complete output (24 lines):
running install
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\admini~1\appdata\local\temp\2\pip-install-xgbxsi\pdfminer\setup.py", line 71, in <module>
'Topic :: Text Processing',
File "c:\python27\lib\site-packages\setuptools\__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "c:\python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "c:\python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "c:\python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\users\admini~1\appdata\local\temp\2\pip-install-xgbxsi\pdfminer\setup.py", line 11, in run
from pdfminer.cmapdb import convert_cmap
File "pdfminer\cmapdb.py", line 22, in <module>
from .psparser import PSStackParser
File "pdfminer\psparser.py", line 4, in <module>
from .utils import choplist
File "pdfminer\utils.py", line 219, in <module>
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff,
File "pdfminer\utils.py", line 187, in <genexpr>
PDFDocEncoding = ''.join(chr(x) for x in (
ValueError: chr() arg not in range(256)
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\admini~1\\appdata\\local\\temp\\2\\pip-install-xgbxsi\\pdfminer\\setup.py'"'"
'; __file__='"'"'c:\\users\\admini~1\\appdata\\local\\temp\\2\\pip-install-xgbxsi\\pdfminer\\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\admini~1\appdata\local\temp\2\pip-record-mdl997\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
This used to work ... and I have no clue on how to fix that.
Recently pdfminer dropped the support for Python 2.
You can try using pdfminer.six, this is a fork of pdfminer that it supports both Python 2 and 3. However, the support for Python 2 will be dropped at January, 2020, so it will only buy you a few months.
Full disclosure: I am one of the maintainers of pdfminer.six.
Related
I am building a environment for running code, the code "import src" which is not in colab, or my PC. I saw the PyPl page, it says I should run 'pip install src', but I still cannot make it.
(base) oblic#oblic-PC:~$ pip install src
Collecting src
Using cached src-0.0.7.zip (6.3 kB)
Building wheels for collected packages: src
Building wheel for src (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/oblic/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qffzaygw/src/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qffzaygw/src/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-m62_ocqn
cwd: /tmp/pip-install-qffzaygw/src/
Complete output (41 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/src
copying src/__init__.py -> build/lib/src
running egg_info
writing src.egg-info/PKG-INFO
writing dependency_links to src.egg-info/dependency_links.txt
writing entry points to src.egg-info/entry_points.txt
writing requirements to src.egg-info/requires.txt
writing top-level names to src.egg-info/top_level.txt
reading manifest file 'src.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'src.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-qffzaygw/src/setup.py", line 96, in <module>
'install_lib': InstallCommand,
File "/home/oblic/anaconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/home/oblic/anaconda3/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/oblic/anaconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/oblic/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/oblic/anaconda3/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 226, in run
reinit_subcommands=True)
File "/home/oblic/anaconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 198, in reinitialize_command
cmd = _Command.reinitialize_command(self, command, reinit_subcommands)
File "/home/oblic/anaconda3/lib/python3.7/distutils/cmd.py", line 306, in reinitialize_command
reinit_subcommands)
File "/home/oblic/anaconda3/lib/python3.7/distutils/dist.py", line 950, in reinitialize_command
for sub in command.get_sub_commands():
File "/home/oblic/anaconda3/lib/python3.7/distutils/cmd.py", line 324, in get_sub_commands
if method is None or method(self):
File "/home/oblic/anaconda3/lib/python3.7/distutils/command/install.py", line 631, in has_lib
return (self.distribution.has_pure_modules() or
AttributeError: 'NoneType' object has no attribute 'has_pure_modules'
----------------------------------------
ERROR: Failed building wheel for src
Running setup.py clean for src
Failed to build src
Installing collected packages: src
Running setup.py install for src ... error
ERROR: Command errored out with exit status 1:
command: /home/oblic/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qffzaygw/src/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qffzaygw/src/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-4y4re6aq/install-record.txt --single-version-externally-managed --compile --install-headers /home/oblic/anaconda3/include/python3.7m/src
cwd: /tmp/pip-install-qffzaygw/src/
Complete output (2 lines):
running install
You've probably made a mistake here and are trying to install from a 'src' directory which doesn't exist.
----------------------------------------
ERROR: Command errored out with exit status 1: /home/oblic/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qffzaygw/src/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qffzaygw/src/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-4y4re6aq/install-record.txt --single-version-externally-managed --compile --install-headers /home/oblic/anaconda3/include/python3.7m/src Check the logs for full command output.
Above is the output when I tried to setup the package 'src'.
I don't know if I can post this or not.
Thank you, all of you. You really helped me to figure out what the question is. Now let me make this clear, and hopefully this case could help others.
The codes I want to run actually are contained in a dictionary called 'src'.
and the programmer wrote their code, for example main.py, with following line:
'''
import src.utils as utils
'''
I made a mistake that I ran the code in the ~/main/src dictionary, so python returned an error "no src module". I was then stupid to find src package.
Actually, one easy way to run the codes is copying all the .py files to the upper level dictionary, in my case ~/main/, and run main.py in ~/main/, because ~/main/src/ contains utils.py, then the code will run smoothly, and no module missing at all.
I'm trying to install pythonnet via pip install pythonnet but accord error shown here:
Collecting pythonnet
Using cached pythonnet-2.4.0.tar.gz (1.8 MB)
Building wheels for collected packages: pythonnet
Building wheel for pythonnet (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/paziresh/virtualenv/paziresh365/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jcvixpk5/pythonnet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jcvixpk5/pythonnet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ig8_5h8m
cwd: /tmp/pip-install-jcvixpk5/pythonnet/
Complete output (43 lines):
running bdist_wheel
running build
running build_ext
/bin/sh: mono: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-jcvixpk5/pythonnet/setup.py", line 658, in <module>
zip_safe=False,
File "/home/paziresh/virtualenv/paziresh365/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 161, in setup
return distutils.core.setup(**attrs)
File "/opt/alt/python36/lib64/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-jcvixpk5/pythonnet/setup.py", line 610, in run
return bdist_wheel.bdist_wheel.run(self)
File "/home/paziresh/virtualenv/paziresh365/3.6/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/opt/alt/python36/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/alt/python36/lib64/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/opt/alt/python36/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/alt/python36/lib64/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/opt/alt/python36/lib64/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/opt/alt/python36/lib64/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/tmp/pip-install-jcvixpk5/pythonnet/setup.py", line 245, in build_extension
self._install_packages()
File "/tmp/pip-install-jcvixpk5/pythonnet/setup.py", line 424, in _install_packages
subprocess.check_call(cmd, shell=use_shell)
File "/opt/alt/python36/lib64/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'mono tools/nuget/nuget.exe update -self' returned non-zero exit status 127.
----------------------------------------
ERROR: Failed building wheel for pythonnet
Running setup.py clean for pythonnet
Failed to build pythonnet
Installing collected packages: pythonnet
Running setup.py install for pythonnet ... error
ERROR: Command errored out with exit status 1:
command: /home/paziresh/virtualenv/paziresh365/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jcvixpk5/pythonnet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jcvixpk5/pythonnet/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-uuxxm05w/install-record.txt --single-version-externally-managed --compile --install-headers /home/paziresh/virtualenv/paziresh365/3.6/include/site/python3.6/pythonnet
cwd: /tmp/pip-install-jcvixpk5/pythonnet/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
ERROR: Command errored out with exit status 1: /home/paziresh/virtualenv/paziresh365/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jcvixpk5/pythonnet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jcvixpk5/pythonnet/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-uuxxm05w/install-record.txt --single-version-externally-managed --compile --install-headers /home/paziresh/virtualenv/paziresh365/3.6/include/site/python3.6/pythonnet Check the logs for full command output.
made some searches and found required libs are wheel, setuptools and scons.so all of them are installed and updated. but nothing changed!
any new idea about that?
I'm using python 3.6.8 and Linux
Iam trying to install torch package through command prompt but I keep getting this error
R: Command errored out with exit status 1: command: 'C:\Users\kaisios\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\kaisios\AppData\Local\Temp\pip-wheel-9mgn8ll8' --python-tag cp37
cwd: C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\torch\
Complete output (30 lines):
running bdist_wheel
running build
running build_deps
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\torch\setup.py", line 265, in <module>
description="Tensors and Dynamic neural networks in Python with strong GPU acceleration",
File "C:\Users\kaisios\Anaconda3\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Users\kaisios\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\kaisios\Anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 192, in run
self.run_command('build')
File "C:\Users\kaisios\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\kaisios\Anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name) File "C:\Users\kaisios\Anaconda3\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\torch\setup.py", line 51, in run
from tools.nnwrap import generate_wrappers as generate_nn_wrappers
ModuleNotFoundError: No module named 'tools.nnwrap' ---------------------------------------- ERROR: Failed building wheel for torch
Running setup.py clean for torch ERROR: Command errored out with exit status 1: command: 'C:\Users\kaisios\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
cwd: C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\torch
Complete output (2 lines):
running clean
error: [Errno 2] No such file or directory: '.gitignore' ----------------------------------------
ERROR: Failed cleaning build dir for torch
Failed to build torch
Installing collected packages: torch, torchvision
Running setup.py install for torch ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\kaisios\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\torch\\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\kaisios\AppData\Local\Temp\pip-record-di7tzuhu\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\torch\ Complete output (23 lines): running install running build_deps Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\torch\setup.py", line 265, in <module>
description="Tensors and Dynamic neural networks in Python with strong GPU acceleration",
File "C:\Users\kaisios\Anaconda3\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Users\kaisios\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\torch\setup.py", line 99, in run
self.run_command('build_deps')
File "C:\Users\kaisios\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\torch\setup.py", line 51, in run
from tools.nnwrap import generate_wrappers as generate_nn_wrappers
ModuleNotFoundError: No module named 'tools.nnwrap' ---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\Users\kaisios\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\torch\\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\kaisios\AppData\Local\Temp\pip-record-di7tzuhu\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
please help to solve the problem
I followed the instructions on the official sklearn website, and even if I fulfil the requirements I still cannot install sklearn. Here is the error message I get :
ERROR: Command errored out with exit status 1:
command: 'd:\others\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\anath\\AppData\\Local\\Temp\\pip-install-dnha64ok\\scikit-learn\\setup.py'"'"'; __file__='"'"'C:\\Users\\anath\\AppData\\Local\\Temp\\pip-install-dnha64ok\\scikit-learn\\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\anath\AppData\Local\Temp\pip-record-s7idmuvg\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\anath\AppData\Local\Temp\pip-install-dnha64ok\scikit-learn\
Complete output (44 lines):
Partial import of sklearn during the build process.
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
Traceback (most recent call last):
File "d:\others\python\lib\site-packages\setuptools\msvc.py", line 489, in _find_latest_available_vc_ver
return self.find_available_vc_vers()[-1]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\anath\AppData\Local\Temp\pip-install-dnha64ok\scikit-learn\setup.py", line 290, in <module>
setup_package()
File "C:\Users\anath\AppData\Local\Temp\pip-install-dnha64ok\scikit-learn\setup.py", line 286, in setup_package
setup(**metadata)
File "d:\others\python\lib\site-packages\numpy\distutils\core.py", line 137, in setup
config = configuration()
File "C:\Users\anath\AppData\Local\Temp\pip-install-dnha64ok\scikit-learn\setup.py", line 174, in configuration
config.add_subpackage('sklearn')
File "d:\others\python\lib\site-packages\numpy\distutils\misc_util.py", line 1033, in add_subpackage
config_list = self.get_subpackage(subpackage_name, subpackage_path,
File "d:\others\python\lib\site-packages\numpy\distutils\misc_util.py", line 999, in get_subpackage
config = self._get_configuration_from_setup_py(
File "d:\others\python\lib\site-packages\numpy\distutils\misc_util.py", line 941, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "sklearn\setup.py", line 76, in configuration
maybe_cythonize_extensions(top_path, config)
File "C:\Users\anath\AppData\Local\Temp\pip-install-dnha64ok\scikit-learn\sklearn\_build_utils\__init__.py", line 42, in maybe_cythonize_extensions
with_openmp = check_openmp_support()
File "C:\Users\anath\AppData\Local\Temp\pip-install-dnha64ok\scikit-learn\sklearn\_build_utils\openmp_helpers.py", line 83, in check_openmp_support
ccompiler.compile(['test_openmp.c'], output_dir='objects',
File "d:\others\python\lib\distutils\_msvccompiler.py", line 360, in compile
self.initialize()
File "d:\others\python\lib\distutils\_msvccompiler.py", line 253, in initialize
vc_env = _get_vc_env(plat_spec)
File "d:\others\python\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "d:\others\python\lib\site-packages\setuptools\msvc.py", line 843, in __init__
self.si = SystemInfo(self.ri, vc_ver)
File "d:\others\python\lib\site-packages\setuptools\msvc.py", line 485, in __init__
self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
available_vc_ver
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\anath\\AppData\\Local\\Temp\\pip-installpip-install-dnha64ok\\scikit-learn\\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\anath\AppData\Local\Temp\pip-record-s7idmuvg\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
It seems like there is a problem with numpy but I already updated to the latest version.
I'm on Windows 10, using Python 3.7, and numpy/scipy are up to date.
Thanks in advance !
Upgrade your python to 3.8 ,because 3.9.0 also have this installation issue.
I think your problem is with setuptools. Upgrade it using the following command:
pip3 install --upgrade setuptools
And then upgrade your scipy/numpy to the latest version :
pip3 install --upgrade numpy
Your C++ build tools are missing too. Get it from here: https://visualstudio.microsoft.com/visual-cpp-build-tools/
You can go to this site for Binaries for windows:
https://www.lfd.uci.edu/~gohlke/pythonlibs/
here you can find required packages if you don't want to install C++ build tools
I try to installing PyObjC using pip but still getting error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-819f93sh/pyobjc-framework-ScreenSaver/setup.py'"'"'; __file__='"'"'/tmp/pip-install-819f93sh/pyobjc-framework-ScreenSaver/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 pip-egg-info
cwd: /tmp/pip-install-819f93sh/pyobjc-framework-ScreenSaver/
Complete output (15 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-819f93sh/pyobjc-framework-ScreenSaver/setup.py", line 21, in <module>
extra_link_args=['-framework', 'ScreenSaver']),
File "/tmp/pip-install-819f93sh/pyobjc-framework-ScreenSaver/pyobjc_setup.py", line 392, in Extension
os_level = get_os_level()
File "/tmp/pip-install-819f93sh/pyobjc-framework-ScreenSaver/pyobjc_setup.py", line 206, in get_os_level
pl = plistlib.readPlist('/System/Library/CoreServices/SystemVersion.plist')
File "/usr/lib/python3.6/plistlib.py", line 162, in readPlist
with _maybe_open(pathOrFile, 'rb') as fp:
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/lib/python3.6/plistlib.py", line 120, in _maybe_open
with open(pathOrFile, mode) as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/System/Library/CoreServices/SystemVersion.plist'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
You cannot. PyObjC can only be installed at MacOS X.
try this :
git clone https://github.com/ronaldoussoren/pyobjc
install it manually :
python3 pyobjc/install.py or python2 pyobjc/install.py or by going in the directory.