I tried to install tensorflow on my local by running pip install tensorflow, and getting following error.
cc1: warning: command line option '-std=c++14' is valid for C++/ObjC++ but not for C
creating None
creating None/tmp
creating None/tmp/tmpzezg1qs3
/home/gooder/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -fPIC -I/home/gooder/anaconda3/include/python3.7m -c /tmp/tmpzezg1qs3/a.c -o None/tmp/tmpzezg1qs3/a.o
Traceback (most recent call last):
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/unixccompiler.py", line 186, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
File "/tmp/pip-install-19mjkv2x/grpcio/src/python/grpcio/_spawn_patch.py", line 54, in _commandfile_spawn
_classic_spawn(self, command)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/ccompiler.py", line 1007, in spawn
spawn(cmd, dry_run=self.dry_run, **kwargs)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/spawn.py", line 71, in spawn
"command {!r} failed with exit code {}".format(cmd, exitcode)
distutils.errors.DistutilsExecError: command '/home/gooder/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-install-19mjkv2x/grpcio/src/python/grpcio/commands.py", line 280, in build_extensions
build_ext.build_ext.build_extensions(self)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 194, in build_extensions
self.build_extension(ext)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
_build_ext.build_extension(self, ext)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 554, in build_extension
depends=ext.depends,
File "/tmp/pip-install-19mjkv2x/grpcio/src/python/grpcio/_parallel_compile_patch.py", line 59, in _parallel_compile
_compile_single_file, objects)
File "/home/gooder/anaconda3/lib/python3.7/multiprocessing/pool.py", line 268, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/home/gooder/anaconda3/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
File "/home/gooder/anaconda3/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/gooder/anaconda3/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/tmp/pip-install-19mjkv2x/grpcio/src/python/grpcio/_parallel_compile_patch.py", line 54, in _compile_single_file
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/unixccompiler.py", line 188, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command '/home/gooder/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit code1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-19mjkv2x/grpcio/setup.py", line 558, in <module>
cmdclass=COMMAND_CLASS,
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
self.run_command(cmd)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/home/gooder/anaconda3/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 325, in run
self.run_command("build")
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 84, in run
_build_ext.run(self)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
self.build_extensions()
File "/tmp/pip-install-19mjkv2x/grpcio/src/python/grpcio/commands.py", line 285, in build_extensions
"Failed `build_ext` step:\n{}".format(formatted_exception))
commands.CommandError: Failed `build_ext` step:
Traceback (most recent call last):
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/unixccompiler.py", line 186, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs)
File "/tmp/pip-install-19mjkv2x/grpcio/src/python/grpcio/_spawn_patch.py", line 54, in _commandfile_spawn
_classic_spawn(self, command)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/ccompiler.py", line 1007, in spawn
spawn(cmd, dry_run=self.dry_run, **kwargs)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/spawn.py", line 71, in spawn
"command {!r} failed with exit code {}".format(cmd, exitcode)
distutils.errors.DistutilsExecError: command '/home/gooder/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-install-19mjkv2x/grpcio/src/python/grpcio/commands.py", line 280, in build_extensions
build_ext.build_ext.build_extensions(self)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 194, in build_extensions
self.build_extension(ext)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
_build_ext.build_extension(self, ext)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 554, in build_extension
depends=ext.depends,
File "/tmp/pip-install-19mjkv2x/grpcio/src/python/grpcio/_parallel_compile_patch.py", line 59, in _parallel_compile
_compile_single_file, objects)
File "/home/gooder/anaconda3/lib/python3.7/multiprocessing/pool.py", line 268, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/home/gooder/anaconda3/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
File "/home/gooder/anaconda3/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/gooder/anaconda3/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/tmp/pip-install-19mjkv2x/grpcio/src/python/grpcio/_parallel_compile_patch.py", line 54, in _compile_single_file
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/home/gooder/anaconda3/lib/python3.7/site-packages/setuptools/_distutils/unixccompiler.py", line 188, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command '/home/gooder/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit code1
----------------------------------------
ERROR: Failed building wheel for grpcio
I have updated my pip version and setup tool version, but still getting the same thing. I also tried using virtual env but still cannot install this. I'm using ubuntu 18.04. Does anyone know what's going on here?
Related
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.
I have installed Python 3.6 with Anaconda 3.
The installation was successful however, when I launch a notebook, there is
kernel error immediatly with the following error message :
Traceback (most recent call last):
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\notebook\base\handlers.py", line 516, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1055, in run
value = future.result()
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\concurrent.py",
line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\notebook\services\sessions\handlers.py", line 75, in post
type=mtype))
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1055, in run
value = future.result()
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\concurrent.py",
line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\notebook\services\sessions\sessionmanager.py", line 79, in
create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name,
type, kernel_name)
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1055,
in run
value = future.result()
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\concurrent.py",
line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\notebook\services\sessions\sessionmanager.py", line 92, in
start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line
1055, in run
value = future.result()
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\concurrent.py",
line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Users\Lionel\Anaconda3\lib\site-packages\tornado\gen.py", line 307,
in wrapper
yielded = next(result)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\notebook\services\kernels\kernelmanager.py", line 94, in
start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\jupyter_client\manager.py", line 257, in start_kernel
**kw)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\jupyter_client\manager.py", line 203, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\Users\Lionel\Anaconda3\lib\site-
packages\jupyter_client\launcher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Users\Lionel\Anaconda3\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "C:\Users\Lionel\Anaconda3\lib\subprocess.py", line 997, in
_execute_child
startupinfo)
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable
Note that before installing Anaconda 3, I uninstalled Anaconda 2 (with Python 2.7).
How can I fix this?
Finally I found a solution in the web :
I had to execute the following command :
python -m ipykernel install --user
Regards,
Lionel
Software stack version:
Spyder 3.2.4
Python 3.5
Zipline 1.1.1
OSX El capitan
When running Zipline from terminal just to try it out:
$ zipline run -f buyapple.py --start 2000-1-1 --end 2014-1-1 -o buyapple_out.pickle
The following error appears:
[2017-12-06 13:17:02.124791] INFO: Loader: Cache at /.../.zipline/data/SPY_benchmark.csv does not have data from 1990-01-02 00:00:00+00:00 to 2017-12-04 00:00:00+00:00.
[2017-12-06 13:17:02.136427] INFO: Loader: Downloading benchmark data for 'SPY' from 1989-12-29 00:00:00+00:00 to 2017-12-04 00:00:00+00:00
Traceback (most recent call last):
File "/Users/newuer/anaconda3/bin/zipline", line 11, in <module>
load_entry_point('zipline==1.1.1', 'console_scripts', 'zipline')()
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/zipline/__main__.py", line 97, in _
return f(*args, **kwargs)
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/zipline/__main__.py", line 240, in run
environ=os.environ,
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/zipline/utils/run_algo.py", line 132, in _run
env = TradingEnvironment(asset_db_path=connstr, environ=environ)
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/zipline/finance/trading.py", line 99, in __init__
self.bm_symbol,
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/zipline/data/loader.py", line 166, in load_market_data
environ,
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/zipline/data/loader.py", line 230, in ensure_benchmark_data
last_date,
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/zipline/data/benchmarks.py", line 50, in get_benchmark_returns
last_date
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/pandas_datareader/data.py", line 137, in DataReader
session=session).read()
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/pandas_datareader/base.py", line 181, in read
params=self._get_params(self.symbols))
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/pandas_datareader/base.py", line 79, in _read_one_data
out = self._read_url_as_StringIO(url, params=params)
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/pandas_datareader/base.py", line 98, in _read_url_as_StringIO
out.write(bytes_to_str(text))
File "/Users/newuer/anaconda3/lib/python3.5/site-packages/pandas/compat/__init__.py", line 72, in bytes_to_str
return b.decode(encoding or 'utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 18112: invalid start byte
I have also tried putting the SPY_benchmark_data.csv directly inside the .zipline/data/ folder, and still the error is produced.
I have also tried a clean install of conda and python env 3.4 -- same issue.
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)
i'm currently having trouble installing cryptography with pip3.
I tried all the other solutions but non of them worked.
Here is the output from "sudo -H pip install cryptography":
Collecting cryptography
Using cached cryptography-1.5.tar.gz
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in /usr/local/lib/python3.5/dist-packages (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.8 in /usr/lib/python3/dist-packages (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /usr/lib/python3/dist-packages (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): setuptools>=11.3 in /usr/local/lib/python3.5/dist-packages (from cryptography)
Collecting cffi>=1.4.1 (from cryptography)
Using cached cffi-1.8.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/local/lib/python3.5/dist-packages (from cffi>=1.4.1->cryptography)
Building wheels for collected packages: cryptography, cffi
Running setup.py bdist_wheel for cryptography ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2saf6qpj/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpme9hnxc5pip-wheel- --python-tag cp35:
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/local/lib/python3.5/dist-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/local/lib/python3.5/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/local/lib/python3.5/dist-packages/setuptools/command/install_lib.py", line 11, 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/local/lib/python3.5/dist-packages/setuptools/command/build_ext.py", line 77, 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/local/lib/python3.5/dist-packages/setuptools/command/build_ext.py", line 198, 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/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 156, in save_modules
yield saved
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 276, in run
return func()
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 245, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-sjss3av8/cffi-1.8.2/setup.py", line 193, in <module>
return True
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/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 1100, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 249, in run_setup
raise
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 168, in save_modules
saved_exc.resume()
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 143, in resume
six.reraise(type, exc, self._tb)
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 156, in save_modules
yield saved
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 276, in run
return func()
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 245, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-sjss3av8/cffi-1.8.2/setup.py", line 193, in <module>
return True
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-2saf6qpj/cryptography/setup.py", line 334, in <module>
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 348, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 394, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 851, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 1123, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 1135, in obtain
return installer(requirement)
File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 461, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 664, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 694, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 875, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 1114, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 1102, 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
----------------------------------------
Failed building wheel for cryptography
Running setup.py clean for cryptography
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2saf6qpj/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" clean --all:
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/local/lib/python3.5/dist-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/local/lib/python3.5/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/local/lib/python3.5/dist-packages/setuptools/command/install_lib.py", line 11, 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/local/lib/python3.5/dist-packages/setuptools/command/build_ext.py", line 77, 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/local/lib/python3.5/dist-packages/setuptools/command/build_ext.py", line 198, 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/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 156, in save_modules
yield saved
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 276, in run
return func()
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 245, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-rfvxg0ae/cffi-1.8.2/setup.py", line 193, in <module>
return True
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/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 1100, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 249, in run_setup
raise
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 168, in save_modules
saved_exc.resume()
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 143, in resume
six.reraise(type, exc, self._tb)
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 156, in save_modules
yield saved
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 276, in run
return func()
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 245, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-rfvxg0ae/cffi-1.8.2/setup.py", line 193, in <module>
return True
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-2saf6qpj/cryptography/setup.py", line 334, in <module>
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 348, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 394, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 851, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 1123, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 1135, in obtain
return installer(requirement)
File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 461, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 664, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 694, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 875, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 1114, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 1102, 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
----------------------------------------
Failed cleaning build dir for cryptography
Running setup.py bdist_wheel for cffi ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2saf6qpj/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp689jaw0cpip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.5/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.5/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.5/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -I/usr/include/python3.5m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.5/c/_cffi_backend.o
c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cryptography cffi
Installing collected packages: cffi, cryptography
Running setup.py install for cffi ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2saf6qpj/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-7jmqgdpf-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/cparser.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/recompiler.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/commontypes.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/verifier.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/model.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/api.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/__init__.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/lock.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.5/cffi
copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.5/cffi
copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.5/cffi
copying cffi/_embedding.h -> build/lib.linux-x86_64-3.5/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/c
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -I/usr/include/python3.5m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.5/c/_cffi_backend.o
c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2saf6qpj/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-7jmqgdpf-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-2saf6qpj/cffi/
I tried understanding the errors but all it says is "failed with error code 1" :/
Checking out other questions, they mentioned about the dependencies for cryptography which is all installed and up-to-date (sudo apt-get install build-essential libssl-dev libffi-dev python-dev):
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
libffi-dev is already the newest version (3.2.1-4).
python-dev is already the newest version (2.7.11-1).
libssl-dev is already the newest version (1.0.2g-1ubuntu4.2).
0 upgraded, 0 newly installed, 0 to remove and 135 not upgraded.
pip3 version:
pip 8.1.2 from /usr/local/lib/python3.5/dist-packages (python 3.5)
Not even easy_install worked. I really don't know what i'm doing wrong here, please help.
From the Python.h: No such file or directory error messages appearing in various places of the log, you need to install python3-dev:
sudo apt install python3-dev