root#NetworkAutomation-1:~# python3 -m pip install netmiko
Collecting netmiko
Using cached https://files.pythonhosted.org/packages/34/c9/ea1ed1ab4f4482a23c342ca2c767daae58e3cf35d9b2bd91ae2c9e980185/netmiko-3.0.0-py2.py3-none-any.whl
Collecting paramiko>=2.4.3 (from netmiko)
Using cached https://files.pythonhosted.org/packages/06/1e/1e08baaaf6c3d3df1459fd85f0e7d2d6aa916f33958f151ee1ecc9800971/paramiko-2.7.1-py2.py3-none-any.whl
Collecting setuptools>=38.4.0 (from netmiko)
Using cached https://files.pythonhosted.org/packages/a7/c5/6c1acea1b4ea88b86b03280f3fde1efa04fefecd4e7d2af13e602661cde4/setuptools-45.1.0-py3-none-any.whl
Collecting pyserial (from netmiko)
Using cached https://files.pythonhosted.org/packages/0d/e4/2a744dd9e3be04a0c0907414e2a01a7c88bb3915cbe3c8cc06e209f59c30/pyserial-3.4-py2.py3-none-any.whl
Collecting scp>=0.13.2 (from netmiko)
Using cached https://files.pythonhosted.org/packages/4d/7a/3d76dc5ad8deea79642f50a572e1c057cb27e8b427f83781a2c05ce4e5b6/scp-0.13.2-py2.py3-none-any.whl
Collecting textfsm (from netmiko)
Using cached https://files.pythonhosted.org/packages/bd/27/0b149b6da3e47cc8daebace6920093114392171a8f5c24f1f2ad9a9e9c4d/textfsm-1.1.0-py2.py3-none-any.whl
Collecting pynacl>=1.0.1 (from paramiko>=2.4.3->netmiko)
Using cached https://files.pythonhosted.org/packages/61/ab/2ac6dea8489fa713e2b4c6c5b549cc962dd4a842b5998d9e80cf8440b7cd/PyNaCl-1.3.0.tar.gz
Complete output from command python setup.py egg_info:
c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
File "/usr/lib/python3.5/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/usr/lib/python3.5/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib/python3.5/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib/python3.5/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 147, in call_command
self.run_command(cmdname)
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install_lib.py", line 23, in run
self.build()
File "/usr/lib/python3.5/distutils/command/install_lib.py", line 109, in build
self.run_command('build_ext')
File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 49, in run
_build_ext.run(self)
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run
self.build_extensions()
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 447, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 472, in _build_extensions_serial
self.build_extension(ext)
File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 174, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/lib/python3.5/distutils/command/build_ext.py", line 532, in build_extension
depends=ext.depends)
File "/usr/lib/python3.5/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib/python3.5/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 243, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 273, in run
return func()
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 242, in runner
_execfile(setup_script, ns)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-v9jxsgyk/cffi-1.13.2/setup.py", line 248, in <module>
"Programming Language :: Python :: Implementation :: PyPy",
File "/usr/lib/python3.5/distutils/core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1087, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 246, in run_setup
raise
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 243, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 273, in run
return func()
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 242, in runner
_execfile(setup_script, ns)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-v9jxsgyk/cffi-1.13.2/setup.py", line 248, in <module>
"Programming Language :: Python :: Implementation :: PyPy",
File "/usr/lib/python3.5/distutils/core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-lo_w_8rl/pynacl/setup.py", line 255, in <module>
"Programming Language :: Python :: 3.7",
File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 269, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1104, in obtain
return installer(requirement)
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 663, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 693, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 873, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1101, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1089, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lo_w_8rl/pynacl/
You are using pip version 8.1.1, however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Related
I am trying to make an executable of a python 3.10 file using PyInstaller in the command prompt:
python -m PyInstaller --onefile 1.0.py
with "1.0" being my file name. I have done this many times before on the same PC and with the same python version, but for this file it is throwing a "file specified not found" error:
while run_next_command(read_fh, write_fh):
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 188, in <module>
run()
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 178, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 59, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 934, in main
build(specfile, distpath, workpath, clean_build)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 856, in build
exec(code, spec_namespace)
File "E:\Python Scripts\High Spen\Combined\1.0.spec", line 7, in <module>
a = Analysis(
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 381, in __init__
self.__postinit__()
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\datastruct.py", line 173, in __postinit__
self.assemble()
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 660, in assemble
isolated.call(find_binary_dependencies, list(self.binaries), self.binding_redirects, collected_packages)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\isolated\_parent.py", line 238, in call
return isolated.call(function, *args, **kwargs)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\isolated\_parent.py", line 176, in call
raise RuntimeError(f"Child process call to {function.__name__}() failed with:\n" + output)
RuntimeError: Child process call to find_binary_dependencies() failed with:
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\pywin32\pywintypes.py", line 35, in pywin32error
yield
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\pywin32\win32api.py", line 43, in LoadLibraryEx
return _dll._LoadLibraryEx(fileName, 0, flags)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\core\cffi\_dll.py", line 23, in _LoadLibraryEx
result = check_null(
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\core\cffi\_util.py", line 81, in __call__
self._raise_error(function_name)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\core\cffi\_util.py", line 92, in _raise_error
raise exception
OSError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\isolated\_child.py", line 63, in run_next_command
output = function(*args, **kwargs)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 162, in find_binary_dependencies
return bindepend.Dependencies(binaries, redirects=binding_redirects, xtrapath=extra_libdirs)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\depend\bindepend.py", line 205, in Dependencies
for ftocnm, fn in getAssemblyFiles(pth, manifest, redirects):
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\depend\bindepend.py", line 372, in getAssemblyFiles
for assembly in getAssemblies(pth):
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\depend\bindepend.py", line 326, in getAssemblies
res = winmanifest.GetManifestResources(pth)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\utils\win32\winmanifest.py", line 979, in GetManifestResources
return winresource.GetResources(filename, [RT_MANIFEST], names, languages)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\utils\win32\winresource.py", line 155, in GetResources
hsrc = win32api.LoadLibraryEx(filename, 0, LOAD_LIBRARY_AS_DATAFILE)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\pywin32\win32api.py", line 42, in LoadLibraryEx
with _pywin32error():
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\lib\contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\pywin32\pywintypes.py", line 37, in pywin32error
raise error(exception.winerror, exception.function, exception.strerror)
win32ctypes.pywin32.pywintypes.error: (2, 'LoadLibraryEx', 'The system cannot find the file specified')
Please could someone let me know how I would solve this or otherwise another method of turning this into an .exe. Thanks
Update:
I have tried uninstalling my python 3.10 and downloading 3.7 instead, as I saw somewhere that PyInstaller is incompatible with 3.8 and above, but this still didn't work for another reason. So I reinstalled 3.10 (effectively at this point I have uninstalled and reinstalled my python and IDE) and I am still getting the same error.
It seems that there are some issues for me to understand this error, I am trying to run setup.py and create a module or whatever it is called but even tho I installed markerlib it still throws an error.
any ideas?
PS D:\Python_Programming_Zed_Show\Python27_Projects\simple_solver> python setup.py sdist
running sdist
running egg_info
writing requirements to SIMPLE_SOLVER.egg-info\requires.txt
writing SIMPLE_SOLVER.egg-info\PKG-INFO
writing top-level names to SIMPLE_SOLVER.egg-info\top_level.txt
writing dependency_links to SIMPLE_SOLVER.egg-info\dependency_links.txt
Traceback (most recent call last):
File "setup.py", line 20, in <module>
setup(**config)
File "D:\Python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "D:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "D:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "d:\users\arhitect\downloads\distribute-0.7.3\distribute-0.7.3\setuptools\command\sdist.py", line 145, in run
self.run_command('egg_info')
File "D:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "D:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "d:\users\arhitect\downloads\distribute-0.7.3\distribute-0.7.3\setuptools\command\egg_info.py", line 177, in run
writer = ep.load(installer=installer)
File "d:\users\arhitect\downloads\distribute-0.7.3\distribute-0.7.3\pkg_resources.py", line 2241, in load
if require: self.require(env, installer)
File "d:\users\arhitect\downloads\distribute-0.7.3\distribute-0.7.3\pkg_resources.py", line 2254, in require
working_set.resolve(self.dist.requires(self.extras),env,installer)))
File "d:\users\arhitect\downloads\distribute-0.7.3\distribute-0.7.3\pkg_resources.py", line 2471, in requires
dm = self._dep_map
File "d:\users\arhitect\downloads\distribute-0.7.3\distribute-0.7.3\pkg_resources.py", line 2682, in _dep_map
self.__dep_map = self._compute_dependencies()
File "d:\users\arhitect\downloads\distribute-0.7.3\distribute-0.7.3\pkg_resources.py", line 2699, in _compute_dependencies
from _markerlib import compile as compile_marker
ImportError: No module named _markerlib
PS D:\Python_Programming_Zed_Show\Python27_Projects\simple_solver>
I am trying to do pip3 install caffe, but I am getting this on Ubuntu x64 machine:
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python3/dist-packages/pip/index.py", line 795, in get_page
resp.raise_for_status()
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/caffe/
stiv#gaidar:~/lpr$
how can I fix it
Caffe should be installed on Ubuntu/Debian via apt-get install cafe-cpu or apt-get install cafe-gpu.
I installed pylint via pip (version 9.0.1) on a Windows 7 machine with Python 3.5.0. The installation succeeded, but invoking Pylint returns an error "RuntimeError: Inconsistent hierarchy". Any ideas on how to troubleshoot this?
14:27:19 C:\Users\user2>pylint Traceback (most recent call last):
File
"c:\users\user2\appdata\local\programs\python\python35-32\lib\functools.py",
line 718, in dispatch
impl = dispatch_cache[cls] File "c:\users\user2\appdata\local\programs\python\python35-32\lib\weakref.py",
line 352, in getitem
return self.data[ref(key)] KeyError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"c:\users\user2\appdata\local\programs\python\python35-32\lib\functools.py",
line 721, in dispatch
impl = registry[cls] KeyError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"c:\users\user2\appdata\local\programs\python\python35-32\lib\runpy.py",
line 170, in _run_module_as_main
"main", mod_spec) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\runpy.py",
line 85, in _run_code
exec(code, run_globals) File "C:\Users\user2\AppData\Local\Programs\Python\Python35-32\Scripts\pylint.exe__main__.py",
line 9, in File
"c:\users\user2\appdata\local\programs\python\python35-32\lib\site-packages\pylint__init__.py",
line 13, in run_pylint
Run(sys.argv[1:]) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\site-packages\pylint\lint.py",
line 1222, in init
linter.load_default_plugins() File "c:\users\user2\appdata\local\programs\python\python35-32\lib\site-packages\pylint\lint.py",
line 453, in load_default_plugins
checkers.initialize(self) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\site-packages\pylint\checkers__init__.py",
line 114, in initialize
register_plugins(linter, path[0]) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\site-packages\pylint\utils.py",
line 992, in register_plugins
module = modutils.load_module_from_file(join(directory, filename)) File
"c:\users\user2\appdata\local\programs\python\python35-32\lib\site-packages\astroid\modutils.py",
line 272, in load_module_from_file
return load_module_from_modpath(modpath, path, use_sys) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\site-packages\astroid\modutils.py",
line 233, in load_module_from_modpath
module = imp.load_module(curname, mp_file, mp_filename, mp_desc) File
"c:\users\user2\appdata\local\programs\python\python35-32\lib\imp.py",
line 234, in load_module
return load_source(name, filename, file) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\imp.py",
line 172, in load_source
module = _load(spec) File "", line 693, in _load File "", line 673, in
_load_unlocked File "", line 662, in exec_module File "", line 222,
in _call_with_frames_removed File
"c:\users\user2\appdata\local\programs\python\python35-32\lib\site-packages\pylint\checkers\python3.py",
line 100, in
class Python3Checker(checkers.BaseChecker): File "c:\users\user2\appdata\local\programs\python\python35-32\lib\site-packages\pylint\checkers\python3.py",
line 501, in Python3Checker
'sys.version_info < (3, 0)', File "c:\users\user2\appdata\local\programs\python\python35-32\lib\site-packages\pylint\checkers\python3.py",
line 496, in
[astroid.extract_node(x).repr_tree() for x in [ File "c:\users\user2\appdata\local\programs\python\python35-32\lib\site-packages\astroid\node_classes.py",
line 624, in repr_tree
_repr_tree(self, result, set()) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\functools.py",
line 743, in wrapper
return dispatch(args[0].class)(*args, **kw) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\site-packages\astroid\node_classes.py",
line 613, in _repr_node
depth) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\functools.py",
line 743, in wrapper
return dispatch(args[0].class)(*args, **kw) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\site-packages\astroid\node_classes.py",
line 613, in _repr_node
depth) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\functools.py",
line 743, in wrapper
return dispatch(args[0].class)(*args, **kw) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\functools.py",
line 723, in dispatch
impl = _find_impl(cls, registry) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\functools.py",
line 674, in _find_impl
mro = _compose_mro(cls, registry.keys()) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\functools.py",
line 662, in _compose_mro
return _c3_mro(cls, abcs=mro) File "c:\users\user2\appdata\local\programs\python\python35-32\lib\functools.py",
line 616, in _c3_mro
other_c3_mros = [_c3_mro(base, abcs=abcs) for base in other_bases] File
"c:\users\user2\appdata\local\programs\python\python35-32\lib\functools.py",
line 616, in
other_c3_mros = [_c3_mro(base, abcs=abcs) for base in other_bases] File
"c:\users\user2\appdata\local\programs\python\python35-32\lib\functools.py",
line 620, in _c3_mro
[explicit_bases] + [abstract_bases] + [other_bases] File "c:\users\user2\appdata\local\programs\python\python35-32\lib\functools.py",
line 571, in _c3_merge
raise RuntimeError("Inconsistent hierarchy") RuntimeError: Inconsistent hierarchy
16:30:52 C:\Users\user2>
Hi I have been trying to install Pandas for Python3.5 on AWS for the past couple of hours. I have googled and looked through a lot of posts related but still can't figure it out. Here's the error I get when I run sudo pip install pandas
You are using pip version 6.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pandas
Using cached pandas-0.20.3.tar.gz
Complete output from command python setup.py egg_info:
Running from numpy source directory.
/tmp/easy_install-t1qzuvjo/numpy-1.13.1/setup.py:367: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
/usr/lib64/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/system_info.py:572: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info()
/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/system_info.py:572: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
self.calc_info()
/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/system_info.py:572: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
self.calc_info()
/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/system_info.py:572: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
self.calc_info()
/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/system_info.py:572: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
self.calc_info()
/usr/lib64/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
/usr/lib64/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
Traceback (most recent call last):
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 152, in save_modules
yield saved
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 237, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 267, in run
return func()
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 236, in runner
_execfile(setup_script, ns)
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/setup.py", line 392, in <module>
"""Custom distutils command subclassed from Cython.Distutils.build_ext
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/setup.py", line 384, in setup_package
""" % src)
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/core.py", line 169, in setup
File "/usr/lib64/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.5/dist-packages/setuptools/command/bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "/usr/lib64/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/command/egg_info.py", line 26, in run
File "/usr/lib64/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/command/build_src.py", line 148, in run
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/command/build_src.py", line 165, in build_sources
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/command/build_src.py", line 324, in build_extension_sources
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/command/build_src.py", line 377, in generate_sources
File "numpy/core/setup.py", line 421, in generate_config_h
tag = bdist_wheel.get_tag(self)
File "numpy/core/setup.py", line 47, in check_types
setuptools_kwargs = {}
File "numpy/core/setup.py", line 280, in check_types
pjoin(ujson_python,'JSONtoObj.c'),
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-j9m4xuc4/pandas/setup.py", line 729, in <module>
**setuptools_kwargs)
File "/usr/lib64/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python3.5/dist-packages/setuptools/dist.py", line 265, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python3.5/dist-packages/setuptools/dist.py", line 310, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 799, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 1049, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 1061, in obtain
return installer(requirement)
File "/usr/lib/python3.5/dist-packages/setuptools/dist.py", line 377, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 642, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 672, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 857, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 1085, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 1071, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 240, in run_setup
raise
File "/usr/lib64/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/usr/lib64/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 164, in save_modules
saved_exc.resume()
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 139, in resume
compat.reraise(type, exc, self._tb)
File "/usr/lib/python3.5/dist-packages/setuptools/compat.py", line 65, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 152, in save_modules
yield saved
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 193, in setup_context
yield
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 237, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 267, in run
return func()
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 236, in runner
_execfile(setup_script, ns)
File "/usr/lib/python3.5/dist-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/setup.py", line 392, in <module>
"""Custom distutils command subclassed from Cython.Distutils.build_ext
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/setup.py", line 384, in setup_package
""" % src)
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/core.py", line 169, in setup
File "/usr/lib64/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib64/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.5/dist-packages/setuptools/command/bdist_egg.py", line 152, in run
self.run_command("egg_info")
File "/usr/lib64/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/command/egg_info.py", line 26, in run
File "/usr/lib64/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib64/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/command/build_src.py", line 148, in run
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/command/build_src.py", line 165, in build_sources
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/command/build_src.py", line 324, in build_extension_sources
File "/tmp/easy_install-t1qzuvjo/numpy-1.13.1/numpy/distutils/command/build_src.py", line 377, in generate_sources
File "numpy/core/setup.py", line 421, in generate_config_h
tag = bdist_wheel.get_tag(self)
File "numpy/core/setup.py", line 47, in check_types
setuptools_kwargs = {}
File "numpy/core/setup.py", line 280, in check_types
pjoin(ujson_python,'JSONtoObj.c'),
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
non-existing path in 'numpy/distutils': 'site.cfg'
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’ [enabled by default]
int exp (void);
^
_configtest.o: In function `main':
/tmp/easy_install-t1qzuvjo/numpy-1.13.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.o: In function `main':
/tmp/easy_install-t1qzuvjo/numpy-1.13.1/_configtest.c:6: undefined reference to `exp'
collect2: error: ld returned 1 exit status
_configtest.c:1:5: warning: conflicting types for built-in function ‘exp’ [enabled by default]
int exp (void);
^
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
_configtest.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-j9m4xuc4/pandas
I have tried uninstalling/installing pandas, numpy.
My pip version seems to be a bit weird:
$ pip --version
pip 9.0.1 from /home/ec2-user/.local/lib/python2.7/site-packages (python 2.7)
$ pip3 --version
pip 6.1.1 from /usr/lib/python3.5/dist-packages (python 3.5)