Error while installing Jupyter on Windows 10 - python

I am getting the following error while Installing Jupyter through
pip install jupyter
Below is the error I am getting:
ERROR: Command errored out with exit status 1:
command: 'c:\users\lenovo\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\LENOVO\\AppData\\Local\\Temp\\pip-install-wxq2b1yw\\pywinpty\\setup.py'"'"'; __file__='"'"'C:\\Users\\LENOVO\\AppData\\Local\\Temp\\pip-install-wxq2b1yw\\pywinpty\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\LENOVO\AppData\Local\Temp\pip-install-wxq2b1yw\pywinpty\pip-egg-info'
cwd: C:\Users\LENOVO\AppData\Local\Temp\pip-install-wxq2b1yw\pywinpty\
Complete output (161 lines):
Compiling C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Plex\Scanners.py because it changed.
Compiling C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Plex\Actions.py because it changed.
Compiling C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Compiler\Scanning.py because it changed.
Compiling C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Compiler\Visitor.py because it changed.
Compiling C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Compiler\FlowControl.py because it changed.
Compiling C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Runtime\refnanny.pyx because it changed.
Compiling C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Compiler\FusedNode.py because it changed.
Compiling C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Tempita\_tempita.py because it changed.
[1/8] Cythonizing C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Compiler\FlowControl.py
[2/8] Cythonizing C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Compiler\FusedNode.py
[3/8] Cythonizing C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Compiler\Scanning.py
[4/8] Cythonizing C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Compiler\Visitor.py
[5/8] Cythonizing C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Plex\Actions.py
[6/8] Cythonizing C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Plex\Scanners.py
[7/8] Cythonizing C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Runtime\refnanny.pyx
[8/8] Cythonizing C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\Cython\Tempita\_tempita.py
Unable to find pgen, not compiling formal grammar.
warning: no files found matching 'Doc\*'
warning: no files found matching '*.pyx' under directory 'Cython\Debugger\Tests'
warning: no files found matching '*.pxd' under directory 'Cython\Debugger\Tests'
warning: no files found matching '*.pxd' under directory 'Cython\Utility'
warning: no files found matching 'pyximport\README'
Traceback (most recent call last):
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 489, in _find_latest_available_vc_ver
return self.find_available_vc_vers()[-1]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\bdist_egg.py", line 172, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\bdist_egg.py", line 158, in call_command
self.run_command(cmdname)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\command\install_lib.py", line 107, in build
self.run_command('build_ext')
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
_build_ext.run(self)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\command\build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\build_ext.py", line 205, in build_extension
_build_ext.build_extension(self, ext)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\command\build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 360, in compile
self.initialize()
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 253, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 843, in __init__
self.si = SystemInfo(self.ri, vc_ver)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 485, in __init__
self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 492, in _find_latest_available_vc_ver
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\setup.py", line 228, in <module>
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
raise
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
saved_exc.resume()
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\LENOVO\AppData\Local\Temp\easy_install-019202gj\Cython-0.29.14\setup.py", line 228, in <module>
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\LENOVO\AppData\Local\Temp\pip-install-wxq2b1yw\pywinpty\setup.py", line 68, in <module>
setup(
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
dist = best[req.key] = env.best_match(
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
return installer(requirement)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\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\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "c:\users\lenovo\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1146, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Related

Exceptions when installing lxml

On Mac OS 10.14.6, I'm trying to install lxml for Python 3.6 with:
> STATIC_DEPS=true easy_install-3.6 lxml
I get this exception:
Exception: Command "./configure --prefix=/private/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/build/tmp/libxml2" returned code 1
Here's the entire trace I get:
Searching for lxml Reading https://pypi.python.org/simple/lxml/
Downloading
https://files.pythonhosted.org/packages/03/a8/73d795778143be51d8b86750b371b3efcd7139987f71618ad9f4b8b65543/lxml-4.5.1.tar.gz#sha256=27ee0faf8077c7c1a589573b1450743011117f1aa1a91d5ae776bbc5ca6070f2
Best match: lxml 4.5.1 Processing lxml-4.5.1.tar.gz Writing
/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.cfg
Running lxml-4.5.1/setup.py -q bdist_egg --dist-dir
/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/egg-dist-tmp-mnc4h10m
Building lxml version 4.5.1. Latest version of zlib is 1.2.11
Downloading zlib into libs/zlib-1.2.11.tar.gz from
https://zlib.net/zlib-1.2.11.tar.gz Unpacking zlib-1.2.11.tar.gz into
build/tmp Latest version of libiconv is 1.16 Downloading libiconv into
libs/libiconv-1.16.tar.gz from
https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz Unpacking
libiconv-1.16.tar.gz into build/tmp Latest version of libxml2 is
2.9.10 Downloading libxml2 into libs/libxml2-2.9.10.tar.gz from http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz Unpacking
libxml2-2.9.10.tar.gz into build/tmp Latest version of libxslt is
1.1.34 Downloading libxslt into libs/libxslt-1.1.34.tar.gz from http://xmlsoft.org/sources/libxslt-1.1.34.tar.gz Unpacking
libxslt-1.1.34.tar.gz into build/tmp Starting build in
build/tmp/zlib-1.2.11 Checking for gcc... Compiler error reporting is
too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting. Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 157, in save_modules
yield saved File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 198, in setup_context
yield File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 248, in run_setup
DirectorySandbox(setup_dir).run(runner) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 278, in run
return func() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 246, in runner
_execfile(setup_script, ns) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 47, in _execfile
exec(code, globals, locals) File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.py",
line 245, in File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.py",
line 153, in setup_extra_options File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setupinfo.py",
line 82, in ext_modules File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py",
line 391, in build_libxml2xslt File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py",
line 330, in cmmi File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py",
line 320, in call_subprocess Exception: Command "./configure
--prefix=/private/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/build/tmp/libxml2"
returned code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"/Library/Frameworks/Python.framework/Versions/3.6/bin/easy_install-3.6",
line 11, in
sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 2265, in main
**kw File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py",
line 148, in setup
dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py",
line 955, in run_commands
self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py",
line 974, in run_command
cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 410, in run
self.easy_install(spec, not self.no_deps) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 665, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 695, in install_item
dists = self.install_eggs(spec, download, tmpdir) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 876, in install_eggs
return self.build_and_install(setup_script, setup_base) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 1115, in build_and_install
self.run_setup(setup_script, setup_base, args) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 1101, in run_setup
run_setup(setup_script, args) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 251, in run_setup
raise File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py",
line 99, in exit
self.gen.throw(type, value, traceback) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 198, in setup_context
yield File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py",
line 99, in exit
self.gen.throw(type, value, traceback) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 169, in save_modules
saved_exc.resume() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 144, in resume
six.reraise(type, exc, self._tb) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/_vendor/six.py",
line 685, in reraise
raise value.with_traceback(tb) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 157, in save_modules
yield saved File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 198, in setup_context
yield File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 248, in run_setup
DirectorySandbox(setup_dir).run(runner) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 278, in run
return func() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 246, in runner
_execfile(setup_script, ns) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 47, in _execfile
exec(code, globals, locals) File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.py",
line 245, in File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.py",
line 153, in setup_extra_options File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setupinfo.py",
line 82, in ext_modules File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py",
line 391, in build_libxml2xslt File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py",
line 330, in cmmi File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py",
line 320, in call_subprocess Exception: Command "./configure
--prefix=/private/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/build/tmp/libxml2"
returned code 1
any help will appreciate!
tanks
Depending on your setup, you might install lxml with one of these commands:
$ apt-get install python-lxml
$ easy_install lxml
$ pip install lxml

Python pip 8.1.1 upgrade failing

I am currently on pip version 8.1.1 and trying to upgrade a package:
root#NetworkAutomation-1:~# pip3 install -U netmiko
But I am receiving this error:
Collecting netmiko
Using cached https://files.pythonhosted.org/packages/26/05/dbe9c97c39f126e7b8dc70cf897dcad557dbd579703f2e3acfd3606d0cee/netmiko-2.4.2-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/f9/d3/955738b20d3832dfa3cd3d9b07e29a8162edb480bf988332f5e6e48ca444/setuptools-44.0.0-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 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 pyserial (from netmiko)
Using cached https://files.pythonhosted.org/packages/0d/e4/2a744dd9e3be04a0c0907414e2a01a7c88bb3915cbe3c8cc06e209f59c30/pyserial-3.4-py2.py3-none-any.whl
Collecting cryptography>=2.5 (from paramiko>=2.4.3->netmiko)
Using cached https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz
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-473w7z52/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-473w7z52/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-d9hokmzc/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-d9hokmzc/pynacl/
You are using pip version 8.1.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root#NetworkAutomation-1:~#
it seems like your gcc is not working not configured correctly.
command 'x86_64-linux-gnu-gcc' failed with exit status 1
Please make sure that your gcc is up to date. If this is not working out try to run pip in verbose mode with the --verbose flag. May you can figure out the error in that way otherwise you need to figure out what does the gcc error causes.
You output clearly says:
c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory
You have to do this:
sudo apt-get install python-dev # for python2.x installs
sudo apt-get install python3-dev # for python3.x installs
or refer to this link for other OS beside Ubuntu:
fatal error: Python.h: No such file or directory

ERROR while trying to install rpy2 using pip

I'm trying to install rpy2 using pip install rpy2 on the command shell, but I get the following ERROR:
Collecting rpy2 Using cached
https://files.pythonhosted.org/packages/c7/43/401afad8556bf92b08bd7d422cacac614b0e8dd2bce31848318bbcb18f48/rpy2-3.0.5.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\msvc.py",
line 477, in init
self.vc_ver = self.find_available_vc_vers()[-1]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 157, in save_modules
yield saved
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 198, in setup_context
yield
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 248, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 278, in run
return func()
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 246, in runner
_execfile(setup_script, ns)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 47, in _execfile
exec(code, globals, locals)
File "C:\Users\pablo\AppData\Local\Temp\easy_install-uj2tljdw\cffi-1.12.3\setup.py",
line 127, in
using R's own C-API through either:
File "C:\Users\pablo\AppData\Local\Temp\easy_install-uj2tljdw\cffi-1.12.3\setup.py",
line 105, in uses_msvc
else:
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\distutils\command\config.py",
line 227, in try_compile
self._compile(body, headers, include_dirs, lang)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\distutils\command\config.py",
line 133, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\distutils_msvccompiler.py",
line 304, in compile
self.initialize()
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\distutils_msvccompiler.py",
line 197, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\msvc.py",
line 172, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\msvc.py",
line 771, in init
self.si = SystemInfo(self.ri, vc_ver)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\msvc.py",
line 480, in init
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools":
http://landinghub.visualstudio.com/visual-cpp-build-tools
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "", line 1, in
File
"C:\Users\pablo\AppData\Local\Temp\pip-install-p0dcir5m\rpy2\setup.py",
line 184, in
'rpy2': ['doc/source/rpy2_logo.png', ]} File
"c:\users\pablo\appdata\local\programs\python\python36-32\lib\distutils\core.py",
line 108, in setup
_setup_distribution = dist = klass(attrs)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\dist.py",
line 315, in init
self.fetch_build_eggs(attrs['setup_requires'])
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\dist.py",
line 361, in fetch_build_eggs
replace_conflicting=True,
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources__init__.py",
line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources__init__.py",
line 1122, in best_match
return self.obtain(req, installer)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources__init__.py",
line 1134, in obtain
return installer(requirement)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\dist.py",
line 429, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\command\easy_install.py",
line 665, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\command\easy_install.py",
line 695, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\command\easy_install.py",
line 876, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\command\easy_install.py",
line 1115, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\command\easy_install.py",
line 1101, in run_setup
run_setup(setup_script, args)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 251, in run_setup
raise
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\contextlib.py",
line 100, in exit
self.gen.throw(type, value, traceback)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 198, in setup_context
yield
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\contextlib.py",
line 100, in exit
self.gen.throw(type, value, traceback)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 169, in save_modules
saved_exc.resume()
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 144, in resume
six.reraise(type, exc, self._tb)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources_vendor\six.py",
line 685, in reraise
raise value.with_traceback(tb)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 157, in save_modules
yield saved
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 198, in setup_context
yield
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 248, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 278, in run
return func()
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 246, in runner
_execfile(setup_script, ns)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\sandbox.py",
line 47, in _execfile
exec(code, globals, locals)
File "C:\Users\pablo\AppData\Local\Temp\easy_install-uj2tljdw\cffi-1.12.3\setup.py",
line 127, in
using R's own C-API through either:
File "C:\Users\pablo\AppData\Local\Temp\easy_install-uj2tljdw\cffi-1.12.3\setup.py",
line 105, in uses_msvc
else:
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\distutils\command\config.py",
line 227, in try_compile
self._compile(body, headers, include_dirs, lang)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\distutils\command\config.py",
line 133, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\distutils_msvccompiler.py",
line 304, in compile
self.initialize()
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\distutils_msvccompiler.py",
line 197, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\msvc.py",
line 172, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\msvc.py",
line 771, in init
self.si = SystemInfo(self.ri, vc_ver)
File "c:\users\pablo\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\msvc.py",
line 480, in init
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools":
http://landinghub.visualstudio.com/visual-cpp-build-tools
---------------------------------------- ERROR: Command "python setup.py egg_info" failed with error code 1 in
C:\Users\pablo\AppData\Local\Temp\pip-install-p0dcir5m\rpy2\
From the looks of it you are missing Microsoft Visual Build Tools. Try installing it:
https://visualstudio.microsoft.com/visual-cpp-build-tools/
Then, restart your computer and update setup tools.
pip install --upgrade setuptools
Once that it done, try installing rpy2 again.
Hope this help!
you can download the binary file of rpy2 from https://www.lfd.uci.edu/~gohlke/pythonlibs/
by searching it in the web page and use pip install 'that binary file'
download binary file according to your python version

not all toga modules have been installed due to an error during installation

when I tried to install toga with pip install toga, it installed but gave me an error:
Installed:
3 package(s) to packages.config projects
Traceback (most recent call last):
File "tools\geninterop\geninterop.py", line 292, in <module>
sys.exit(main())
File "tools\geninterop\geninterop.py", line 272, in main
python_h = preprocess_python_headers()
File "tools\geninterop\geninterop.py", line 192, in preprocess_python_headers
for line in _check_output(cmd).splitlines():
File "tools\geninterop\geninterop.py", line 41, in _check_output
output = subprocess.check_output(*args, **kwargs)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\subprocess.py", line 389, in check_output
**kwargs).stdout
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\subprocess.py", line 466, in run
with Popen(*popenargs, **kwargs) as process:
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\subprocess.py", line 769, in __init__
restore_signals, start_new_session)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\subprocess.py", line 1172, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\cfast\AppData\Local\Temp\pip-install-fep_tzdy\pythonnet\setup.py", line 405, in <module>
zip_safe=False,
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\command\build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\command\build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\cfast\AppData\Local\Temp\pip-install-fep_tzdy\pythonnet\setup.py", line 191, in build_extension
subprocess.check_call([sys.executable, geninterop, interop_file])
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\subprocess.py", line 341, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['c:\\users\\cfast\\appdata\\local\\programs\\python\\python37-32\\python.exe', 'tools\\geninterop\\geninterop.py', 'src\\runtime\
----------------------------------------
Command "c:\users\cfast\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\cfast\\AppData\\Local\\Temp\\pip-install-'\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\cfast\AppData\Local\Temp\pip-record-crjqtxre\install-record.txt --single-version-extell-fep_tzdy\pythonnet\
my python code:
import toga
class Freedom(toga.App):
def startup(self):
self.main_window = toga.MainWindow(self.name)
self.main_window.app = self
box = toga.Box()
self.main_window.content = box
self.main_window.show()
def main():
return Freedom('Freedom Units', 'org.pybee.freedom')
if __name__ == '__main__':
main()
but when I run my code it gives me this:
Traceback (most recent call last):
File "c:\projects\apps\eclipse\tempCodeRunnerFile.py", line 19, in <module>
main()
File "c:\projects\apps\eclipse\tempCodeRunnerFile.py", line 16, in main
return Freedom('Freedom Units', 'org.pybee.freedom') File
"C:\Users\cfast\AppData\Local\Programs\Python\Python37-32\lib\site-
packages\toga\app.py", line 53, in __init__
self.factory = get_platform_factory(factory) File
"C:\Users\cfast\AppData\Local\Programs\Python\Python37-32\lib\site-
packages\toga\platform.py", line 42, in get_platform_factory
from toga_winforms import factoryModuleNotFoundError: No module named
'toga_winforms'
then I tried to install toga_winforms with pip install toga_Winforms
but it gave me the same first error, I tried looking for solutions but got nowhere.
any help is appreciated.

Running Keras using theano

I have followd the link provided by Keras to download theano backend linkon windows (mine is windows 10). but when I import Kares. I got the followings:
Problem occurred during compilation with the command line below:
"C:\MinGW\bin\g++.exe" -shared -g -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"C:\Python27\lib\site-packages\numpy\core\include" -I"C:\Python27\include" -I"C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\gof" -L"C:\Python27\libs" -L"C:\Python27" -o C:\Users\M\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.13-64\lazylinker_ext\lazylinker_ext.pyd C:\Users\M\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.13-64\lazylinker_ext\mod.cpp -lpython27
Traceback (most recent call last):
File "C:\Users\M\Desktop\Experiment_Calculation.py", line 5, in <module>
import keras
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\keras\__init__.py", line 3, in <module>
from . import activations
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\keras\activations.py", line 4, in <module>
from . import backend as K
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\keras\backend\__init__.py", line 70, in <module>
from .theano_backend import *
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\keras\backend\theano_backend.py", line 3, in <module>
import theano
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\__init__.py", line 66, in <module>
from theano.compile import (
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\compile\__init__.py", line 10, in <module>
from theano.compile.function_module import *
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\compile\function_module.py", line 21, in <module>
import theano.compile.mode
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\compile\mode.py", line 10, in <module>
import theano.gof.vm
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\gof\vm.py", line 662, in <module>
from . import lazylinker_c
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\gof\lazylinker_c.py", line 127, in <module>
preargs=args)
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\gof\cmodule.py", line 2316, in compile_str
(status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): C:\Users\M\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.13-64\lazylinker_ext\mod.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in
. #include <Python.h>
. ^
.
I don't get the issue, Can Anyone please help with this problem?
I solved the above problem by editting the path enviroments, because I figured out that I have two version of Mingw. Thus, I removed the old one.
However, I got another error while downloading Kares following the link [link]
The error is as follows:
running develop
running egg_info
writing dependency_links to Keras.egg-info\dependency_links.txt
writing Keras.egg-info\PKG-INFO
writing requirements to Keras.egg-info\requires.txt
writing top-level names to Keras.egg-info\top_level.txt
reading manifest file 'Keras.egg-info\SOURCES.txt'
writing manifest file 'Keras.egg-info\SOURCES.txt'
running build_ext
Creating c:\python\python35\lib\site-packages\Keras.egg-link (link to .)
Keras 2.0.4 is already the active version in easy-install.pth
Installed c:\users\m\anaconda2\lib\site-packages\keras
Processing dependencies for Keras==2.0.4
Searching for scipy>=0.14
Reading https://pypi.python.org/simple/scipy/
Best match: scipy 0.19.0
Downloading https://pypi.python.org/packages/e5/93/9a8290e7eb5d4f7cb53b9a7ad7b92b9827ecceaddfd04c2a83f195d8767d/scipy-0.19.0.zip#md5=91b8396231eec780222a57703d3ec550
Processing scipy-0.19.0.zip
Writing C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\setup.cfg
Running scipy-0.19.0\setup.py -q bdist_egg --dist-dir
C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\egg-dist-tmp-ebc75q91
C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\setup.py:323: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command, proceeding with "
Traceback (most recent call last):
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 243, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 273, in run
return func()
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 242, in runner
_execfile(setup_script, ns)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\setup.py", line 416, in <module>
File "C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\setup.py", line 396, in setup_package
ImportError: No module named 'numpy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "setup.py", line 22, in <module>
packages=find_packages())
File "C:\Python\python35\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python\python35\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python\python35\lib\site-packages\setuptools\command\develop.py", line 34, in run
self.install_for_development()
File "C:\Python\python35\lib\site-packages\setuptools\command\develop.py", line 133, in install_for_development
self.process_distribution(None, self.dist, not self.no_deps)
File "C:\Python\python35\lib\site-packages\setuptools\command\easy_install.py", line 717, in process_distribution
[requirement], self.local_index, self.easy_install
File "C:\Python\python35\lib\site-packages\pkg_resources\__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "C:\Python\python35\lib\site-packages\pkg_resources\__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "C:\Python\python35\lib\site-packages\pkg_resources\__init__.py", line 1104, in obtain
return installer(requirement)
File "C:\Python\python35\lib\site-packages\setuptools\command\easy_install.py", line 640, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "C:\Python\python35\lib\site-packages\setuptools\command\easy_install.py", line 670, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "C:\Python\python35\lib\site-packages\setuptools\command\easy_install.py", line 850, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "C:\Python\python35\lib\site-packages\setuptools\command\easy_install.py", line 1078, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "C:\Python\python35\lib\site-packages\setuptools\command\easy_install.py", line 1064, in run_setup
run_setup(setup_script, args)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 246, in run_setup
raise
File "C:\Python\python35\lib\contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Python\python35\lib\contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
saved_exc.resume()
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "C:\Python\python35\lib\site-packages\pkg_resources\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 243, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 273, in run
return func()
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 242, in runner
_execfile(setup_script, ns)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\setup.py", line 416, in <module>
File "C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\setup.py", line 396, in setup_package
ImportError: No module named 'numpy'
I don't know why is this occuring. I have numpy intalld already.
Any suggestions ?

Categories

Resources