I am installing packages from requirments.txt file using this command
pip install -r C:\Users\MSI\Desktop\pddSpider-master\requirements.txt
it returns after installing some packages:
ERROR: Command errored out with exit status 1:
command: 'c:\users\msi\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MSI\\AppData\\Local\\Temp\\pip-install-i3ladjxy\\cffi_d7086d7149244c569b1d283214caf323\\setup.py'"'"'; __file__='"'"'C:\\Users\\MSI\\AppData\\Local\\Temp\\pip-install-i3ladjxy\\cffi_d7086d7149244c569b1d283214caf323\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\MSI\AppData\Local\Temp\pip-pip-egg-info-sdkc1qs8'
cwd: C:\Users\MSI\AppData\Local\Temp\pip-install-i3ladjxy\cffi_d7086d7149244c569b1d283214caf323\
Complete output (19 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\MSI\AppData\Local\Temp\pip-install-i3ladjxy\cffi_d7086d7149244c569b1d283214caf323\setup.py", line 120, in <module>
if sys.platform == 'win32' and uses_msvc():
File "C:\Users\MSI\AppData\Local\Temp\pip-install-i3ladjxy\cffi_d7086d7149244c569b1d283214caf323\setup.py", line 98, in uses_msvc
return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
File "c:\users\msi\appdata\local\programs\python\python38-32\lib\distutils\command\config.py", line 225, in try_compile
self._compile(body, headers, include_dirs, lang)
File "c:\users\msi\appdata\local\programs\python\python38-32\lib\distutils\command\config.py", line 132, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "c:\users\msi\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 327, in compile
self.initialize()
File "c:\users\msi\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 224, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\users\msi\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 314, in msvc14_get_vc_env
return _msvc14_get_vc_env(plat_spec)
File "c:\users\msi\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 268, in _msvc14_get_vc_env
raise distutils.errors.DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
----------------------------
Please Check your Microsoft Visual C++ version and upgrade it to version 14.0 or above.
Related
I'm trying to install the rpy2 package and can't get past a "The system cannot find the file specified". I'm not sure what file it can't find or why it isn't able to install (it is downloading the tar.gz file but won't install into the env).
I'm running on windows with python 3.6.8
Collecting rpy2
Using cached rpy2-3.3.6.tar.gz (179 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\paulj\\AppData\\Local\\Temp\\pip-install-ih4008f_\\rpy2\\setup.py'"'"'; __file__='"'"'C:\\Users\\paulj\\AppData\\Local\\Temp\\pip-install-ih4008f_\\rpy2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\paulj\AppData\Local\Temp\pip-pip-egg-info-47z8bowi'
cwd: C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\
Complete output (20 lines):
cffi mode: CFFI_MODE.ANY
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\setup.py", line 115, in <module>
c_extension_status = get_r_c_extension_status()
File "C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\setup.py", line 99, in get_r_c_extension_status
*situation.get_r_flags(r_home, '--ldflags')
File "C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\rpy2\situation.py", line 210, in get_r_flags
allow_empty=False)))
File "C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\rpy2\situation.py", line 179, in _get_r_cmd_config
universal_newlines=True
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\subprocess.py", line 356, in check_output
**kwargs).stdout
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\subprocess.py", line 1017, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
I'm trying to install dotenv for my discord bot with pip3 install dotenv but it keeps giving me this error:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xmobtpdk/dotenv/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xmobtpdk/dotenv/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 /tmp/pip-install-xmobtpdk/dotenv/pip-egg-info
cwd: /tmp/pip-install-xmobtpdk/dotenv/
Complete output (51 lines):
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-ts7a2idz/distribute/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-ts7a2idz/distribute/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 /tmp/pip-pip-egg-info-vsx7w_h3
cwd: /tmp/pip-wheel-ts7a2idz/distribute/
Complete output (15 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-wheel-ts7a2idz/distribute/setuptools/__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "/tmp/pip-wheel-ts7a2idz/distribute/setuptools/extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "/tmp/pip-wheel-ts7a2idz/distribute/setuptools/dist.py", line 7, in <module>
from setuptools.command.install import install
File "/tmp/pip-wheel-ts7a2idz/distribute/setuptools/command/__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "/tmp/pip-wheel-ts7a2idz/distribute/setuptools/command/install_scripts.py", line 3, in <module>
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "/tmp/pip-wheel-ts7a2idz/distribute/pkg_resources.py", line 1518, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Traceback (most recent call last):
File "/home/fanjin/.local/lib/python3.8/site-packages/setuptools/installer.py", line 126, in fetch_build_egg
subprocess.check_call(cmd)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpa_3vnder', '--quiet', 'distribute']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-xmobtpdk/dotenv/setup.py", line 13, in <module>
setup(name='dotenv',
File "/home/fanjin/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "/home/fanjin/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/home/fanjin/.local/lib/python3.8/site-packages/setuptools/dist.py", line 673, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/home/fanjin/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 764, in resolve
dist = best[req.key] = env.best_match(
File "/home/fanjin/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1049, in best_match
return self.obtain(req, installer)
File "/home/fanjin/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1061, in obtain
return installer(requirement)
File "/home/fanjin/.local/lib/python3.8/site-packages/setuptools/dist.py", line 732, in fetch_build_egg
return fetch_build_egg(self, req)
File "/home/fanjin/.local/lib/python3.8/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpa_3vnder', '--quiet', 'distribute']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I'm using Linux and I already tried sudo pip3 install --upgrade pip setuptools wheel and tried install dotenv again but that didn't work. I also tried sudo easy_install -U setuptools but that didn't work either. I also tried installing another module and it worked, but not for dotenv.
Oh it's because the package is called python-dotenv not dotenv.
Following this link, I've been trying to install the tflite-support module using pip. I get the following error:
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/setup.py'"'"'; __file__='"'"'/private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/pip-egg-info
cwd: /private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/
Complete output (27 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/setup.py", line 178, in <module>
zip_safe=False,
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/__init__.py", line 143, in setup
_install_setup_requires(attrs)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/__init__.py", line 138, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/dist.py", line 698, in fetch_build_eggs
replace_conflicting=True,
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/pkg_resources/__init__.py", line 783, in resolve
replace_conflicting=replace_conflicting
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/pkg_resources/__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/pkg_resources/__init__.py", line 1078, in obtain
return installer(requirement)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/dist.py", line 754, in fetch_build_egg
return fetch_build_egg(self, req)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/installer.py", line 133, in fetch_build_egg
wheel.install_as_egg(dist_location)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/wheel.py", line 103, in install_as_egg
self._install_as_egg(destination_eggdir, zf)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/wheel.py", line 111, in _install_as_egg
self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/wheel.py", line 132, in _convert_metadata
os.mkdir(destination_eggdir)
FileExistsError: [Errno 17] File exists: '/private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/.eggs/pybind11-2.4.3-py3.7.egg'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Any leads? I know similar questions have been asked before, but no luck with those answers
Turning the comment into an answer:
This looks like a regression in setuptools. Downgrade to 41:
$ pip install --upgrade 'setuptools<42'
Now (ideally) preinstall pybind11 to avoid missing headers when building the tflite-support wheel:
$ pip install 'pybind11>=2.4'
Now installing tflite-support should succeed without any intermediate errors:
$ pip install tflite-support
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.