In my code I am trying to use :
from dbn.tensorflow import SupervisedDBNClassification
I got on this error:
Import "dbn.tensorflow" could not be resolved
Any solution please?
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Update:
After install requirements.txt
ERROR: Command errored out with exit status 1:
command: 'c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pc\\AppData\\Local\\Temp\\pip-install-794c6ozn\\scipy\\setup.py'"'"'; __file__='"'"'C:\\Users\\pc\\AppData\\Local\\Temp\\pip-install-794c6ozn\\scipy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\pc\AppData\Local\Temp\pip-install-794c6ozn\scipy\
Complete output (93 lines):
Running from numpy source directory.
C:\Users\pc\AppData\Local\Temp\easy_install-e0ydh06f\numpy-1.23.1\setup.py:86: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
import numpy.distutils.command.sdist
Traceback (most recent call last):
File "C:\Users\pc\AppData\Local\Temp\easy_install-e0ydh06f\numpy-1.23.1\setup.py", line 251, in generate_cython
- `pip install .` (from a git repo or downloaded source
ModuleNotFoundError: No module named 'Cython'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\pc\AppData\Local\Temp\easy_install-e0ydh06f\numpy-1.23.1\setup.py", line 493, in <module>
File "C:\Users\pc\AppData\Local\Temp\easy_install-e0ydh06f\numpy-1.23.1\setup.py", line 475, in setup_package
File "C:\Users\pc\AppData\Local\Temp\easy_install-e0ydh06f\numpy-1.23.1\setup.py", line 258, in generate_cython
if '--help' in sys.argv[1:] or '-h' in sys.argv[1]:
OSError: Cython needs to be installed in Python as a module
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\pc\AppData\Local\Temp\pip-install-794c6ozn\scipy\setup.py", line 415, in <module>
setup_package()
File "C:\Users\pc\AppData\Local\Temp\pip-install-794c6ozn\scipy\setup.py", line 411, in setup_package
setup(**metadata)
File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
dist = best[req.key] = env.best_match(
File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
return installer(requirement)
File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:\users\pc\desktop\ali\rbfnetworks\deep-belief-network-master\env\lib\site-packages\setuptools\command\easy_install.py", line 7
If you installed through pip, you probably installed this library: Decentralized-Bluetooth-Network. Not what you were looking for.
You just have to follow the instruction at the Github repository. I'll write them below:
First clone the repository: git clone https://github.com/albertbup/deep-belief-network.git
Move to the cloned repository folder: cd deep-belief-network
If you are using an environment create it and activate it
Execute pip install -r requirements.txt to install all the requirements needed.
I have tried to install the bls-lib library but this error kept showing, can anyone help me what's wrong with it? I even tried to install the petlib library because I thought that it will solve the problem but I got an almost simmilar error.
(venv) C:\Users\admin\PycharmProjects\Testing\venv>pip install bls-lib
Collecting bls-lib
Using cached bls_lib-1.0.1-py3-none-any.whl (16 kB)
Collecting bplib
Using cached bplib-0.0.6.tar.gz (40 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\admin\pycharmprojects\testing\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\admin\\AppData\\Lo
cal\\Temp\\pip-install-bys_0pq0\\bplib\\setup.py'"'"'; __file__='"'"'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-bys_0pq0\\bplib\\setup.py'"'"';f=getattr(tok
enize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-ba
se 'C:\Users\admin\AppData\Local\Temp\pip-pip-egg-info-b9zc7inm'
cwd: C:\Users\admin\AppData\Local\Temp\pip-install-bys_0pq0\bplib\
Complete output (63 lines):
ERROR: Command errored out with exit status 1:
command: 'c:\users\admin\pycharmprojects\testing\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\admin\\AppData
\\Local\\Temp\\pip-wheel-p1rs96jl\\petlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-wheel-p1rs96jl\\petlib\\setup.py'"'"';f=getattr(t
okenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-
base 'C:\Users\admin\AppData\Local\Temp\pip-pip-egg-info-iyyhus4_'
cwd: C:\Users\admin\AppData\Local\Temp\pip-wheel-p1rs96jl\petlib\
Complete output (27 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\admin\AppData\Local\Temp\pip-wheel-p1rs96jl\petlib\setup.py", line 7, in <module>
setup(name='petlib',
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\dist.py", line 423, in __init__
_Distribution.__init__(self, {
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 292, in __init__
self.finalize_options()
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\dist.py", line 695, in finalize_options
ep(self)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\dist.py", line 702, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\cffi\setuptools_ext.py", line 219, in cffi_modules
add_cffi_module(dist, cffi_module)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\cffi\setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\cffi\setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "petlib/compile.py", line 34, in <module>
openssl_conf = os.environ["OPENSSL_CONF"]
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\os.py", line 679, in __getitem__
raise KeyError(key) from None
KeyError: 'OPENSSL_CONF'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Traceback (most recent call last):
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\installer.py", line 126, in fetch_build_egg
subprocess.check_call(cmd)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['c:\\users\\admin\\pycharmprojects\\testing\\venv\\scripts\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wh
eel', '--no-deps', '-w', 'C:\\Users\\admin\\AppData\\Local\\Temp\\tmpu5quqolr', '--quiet', 'petlib>=0.0.45']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\admin\AppData\Local\Temp\pip-install-bys_0pq0\bplib\setup.py", line 7, in <module>
setup(name='bplib',
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\dist.py", line 673, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\pkg_resources\__init__.py", line 764, in resolve
dist = best[req.key] = env.best_match(
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\pkg_resources\__init__.py", line 1049, in best_match
return self.obtain(req, installer)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\pkg_resources\__init__.py", line 1061, in obtain
return installer(requirement)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\dist.py", line 732, in fetch_build_egg
return fetch_build_egg(self, req)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\installer.py", line 128, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['c:\\users\\admin\\pycharmprojects\\testing\\venv\\scripts\\python.exe', '-m', 'pip', '--disable-pip-version-check', '
wheel', '--no-deps', '-w', 'C:\\Users\\admin\\AppData\\Local\\Temp\\tmpu5quqolr', '--quiet', 'petlib>=0.0.45']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
This is the error of installing the petlib library:
(venv) C:\Users\admin\PycharmProjects\Testing>pip install petlib
Collecting petlib
Using cached petlib-0.0.45.tar.gz (245 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\admin\pycharmprojects\testing\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\admin\\AppData\\Lo
cal\\Temp\\pip-install-yp8f_epx\\petlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-yp8f_epx\\petlib\\setup.py'"'"';f=getattr(t
okenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-
base 'C:\Users\admin\AppData\Local\Temp\pip-pip-egg-info-gyl6jkzc'
cwd: C:\Users\admin\AppData\Local\Temp\pip-install-yp8f_epx\petlib\
Complete output (27 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\admin\AppData\Local\Temp\pip-install-yp8f_epx\petlib\setup.py", line 7, in <module>
setup(name='petlib',
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\dist.py", line 423, in __init__
_Distribution.__init__(self, {
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 292, in __init__
self.finalize_options()
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\dist.py", line 695, in finalize_options
ep(self)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\setuptools\dist.py", line 702, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\cffi\setuptools_ext.py", line 219, in cffi_modules
add_cffi_module(dist, cffi_module)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\cffi\setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "c:\users\admin\pycharmprojects\testing\venv\lib\site-packages\cffi\setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "petlib/compile.py", line 34, in <module>
openssl_conf = os.environ["OPENSSL_CONF"]
File "C:\Users\admin\AppData\Local\Programs\Python\Python39\lib\os.py", line 679, in __getitem__
raise KeyError(key) from None
KeyError: 'OPENSSL_CONF'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
"pip install Pillow" got error!
I installed Debian system on Orange Pie zero
(http://www.orangepi.org/download resources/orangepizero/2016-11-24/orangepizero_3cf6c296784e7ae2cd8cb.html)
Linux OrangePizero 3.4.39 #2 SMP PREEMPT Mon Nov 21 16:23:11 CST 2016 armv7l
GNU/Linux
Python 3.4.2
pip 1.5.6 from /usr/lib/python3/dist-packages (python 3.4)
When I installed pillow with pip3, I encountered the following error
Downloading/unpacking Pillow
Downloading Pillow-6.1.0.tar.gz (33.8MB): 33.8MB downloaded
Running setup.py (path:/tmp/pip-build-g2pkqhvw/Pillow/setup.py) egg_info for package Pillow
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-g2pkqhvw/Pillow/setup.py", line 873, in <module>
zip_safe=not (debug_build() or PLATFORM_MINGW),
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "<string>", line 15, in replacement_run
File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 193, in find_sources
mm.run()
File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 277, in run
self.add_defaults()
File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 306, in add_defaults
sdist.add_defaults(self)
File "/usr/lib/python3/dist-packages/setuptools/command/sdist.py", line 183, in add_defaults
build_ext = self.get_finalized_command('build_ext')
File "/usr/lib/python3.4/distutils/cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "/usr/lib/python3.4/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/tmp/pip-build-g2pkqhvw/Pillow/setup.py", line 324, in finalize_options
if sys.version_info.major >= 3 and not self.parallel:
File "/usr/lib/python3.4/distutils/cmd.py", line 103, in __getattr__
raise AttributeError(attr)
AttributeError: parallel
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/Pillow.egg-info
writing dependency_links to pip-egg-info/Pillow.egg-info/dependency_links.txt
writing top-level names to pip-egg-info/Pillow.egg-info/top_level.txt
writing pip-egg-info/Pillow.egg-info/PKG-INFO
writing manifest file 'pip-egg-info/Pillow.egg-info/SOURCES.txt'
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
warning: manifest_maker: standard file '-c' not found
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-g2pkqhvw/Pillow/setup.py", line 873, in <module>
zip_safe=not (debug_build() or PLATFORM_MINGW),
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "<string>", line 15, in replacement_run
File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 193, in find_sources
mm.run()
File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 277, in run
self.add_defaults()
File "/usr/lib/python3/dist-packages/setuptools/command/egg_info.py", line 306, in add_defaults
sdist.add_defaults(self)
File "/usr/lib/python3/dist-packages/setuptools/command/sdist.py", line 183, in add_defaults
build_ext = self.get_finalized_command('build_ext')
File "/usr/lib/python3.4/distutils/cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "/usr/lib/python3.4/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/tmp/pip-build-g2pkqhvw/Pillow/setup.py", line 324, in finalize_options
if sys.version_info.major >= 3 and not self.parallel:
File "/usr/lib/python3.4/distutils/cmd.py", line 103, in __getattr__
raise AttributeError(attr)
AttributeError: parallel
I hope to solve this problem.
Thank you in advance for your help.
Use Python 3.5+ or older version of Pillow. Python 3.4 is retired:
https://github.com/python-pillow/Pillow/issues/3581
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