ERROR while trying to install rpy2 using pip - python

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

Related

TypeError: expected str, bytes or os.PathLike object, not NoneType while trying to install muonic

I'm trying to install an interface that consists of a package and a python executable. I've already added the necessary modules, but now it gives me this error. The modules I need to use are:
python-scipy
python-matplotlib
python-numpy
python-qt4
python-serial
Does anybody know, what I can do to fix this? Thank you for your help
(venv) C:\Users\matsj\PycharmProjects\PythonPractice>easy_install --user muonic
WARNING: The user site-packages directory is disabled.
WARNING: The easy_install command is deprecated and will be removed in a future version.
Searching for muonic
Reading https://pypi.org/simple/muonic/
Downloading https://files.pythonhosted.org/packages/3c/39/99ecbc20b1c30ebba260106c772cde0f15a6ff8f5d5f5b0e881004e558e3/muonic-3.0.0.tar.gz#sha256=6cf7e77337497fa62222c40245dc18f58350fb4cc
83573bffa47c4adb28d1154
Best match: muonic 3.0.0
Processing muonic-3.0.0.tar.gz
Writing C:\Users\matsj\AppData\Local\Temp\easy_install-2k4bma4_\muonic-3.0.0\setup.cfg
Running muonic-3.0.0\setup.py -q bdist_egg --dist-dir C:\Users\matsj\AppData\Local\Temp\easy_install-2k4bma4_\muonic-3.0.0\egg-dist-tmp-_d0ztsor
Traceback (most recent call last):
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\matsj\AppData\Local\Temp\easy_install-2k4bma4_\muonic-3.0.0\setup.py", line 17, in <module>
File "C:\Users\matsj\AppData\Local\Temp\easy_install-2k4bma4_\muonic-3.0.0\muonic\__init__.py", line 17, in <module>
File "C:\Users\matsj\AppData\Local\Programs\Python\Python38-32\lib\ntpath.py", line 78, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\matsj\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\matsj\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\matsj\PycharmProjects\PythonPractice\venv\Scripts\easy_install.exe\__main__.py", line 7, in <module>
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\command\easy_install.py", line 2343, in main
setup(
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\__init__.py", line 161, in setup
return distutils.core.setup(**attrs)
File "C:\Users\matsj\AppData\Local\Programs\Python\Python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\matsj\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\matsj\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\command\easy_install.py", line 424, in run
self.easy_install(spec, not self.no_deps)
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\command\easy_install.py", line 692, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\command\easy_install.py", line 718, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\command\easy_install.py", line 903, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\command\easy_install.py", line 1171, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\command\easy_install.py", line 1157, in run_setup
run_setup(setup_script, args)
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
raise
File "C:\Users\matsj\AppData\Local\Programs\Python\Python38-32\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Users\matsj\AppData\Local\Programs\Python\Python38-32\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
saved_exc.resume()
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\users\matsj\pycharmprojects\pythonpractice\venv\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\matsj\AppData\Local\Temp\easy_install-2k4bma4_\muonic-3.0.0\setup.py", line 17, in <module>
File "C:\Users\matsj\AppData\Local\Temp\easy_install-2k4bma4_\muonic-3.0.0\muonic\__init__.py", line 17, in <module>
File "C:\Users\matsj\AppData\Local\Programs\Python\Python38-32\lib\ntpath.py", line 78, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Muonic, based on the documentation, appears to be made for Linux, while you are trying to install it on a Windows machine. This is likely why the path variable is a nonetype and is causing the problem.

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

How do I solve error "dotenv installation error" on pycharm

I am trying to install dotenv package on pycharm edu,but keep getting error that reads "AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader' "
I tried to solve this using the python terminal by running command "pip install --user dotenv" as root user but still got the same error
command output reads as follows
Collecting dotenv
Using cached https://files.pythonhosted.org/packages/e2/46/3754073706e31670eed18bfa8a879305b56a471db15f20523c2427b10078/dotenv-0.0.5.tar.gz
Complete output from command python setup.py egg_info:
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 194, in setup_context
__import__('setuptools')
File "/tmp/easy_install-vzgpp8in/distribute-0.7.3/setuptools/__init__.py", line 2, in <module>
File "/tmp/easy_install-vzgpp8in/distribute-0.7.3/setuptools/extension.py", line 5, in <module>
File "/tmp/easy_install-vzgpp8in/distribute-0.7.3/setuptools/dist.py", line 7, in <module>
File "/tmp/easy_install-vzgpp8in/distribute-0.7.3/setuptools/command/__init__.py", line 8, in <module>
File "/tmp/easy_install-vzgpp8in/distribute-0.7.3/setuptools/command/install_scripts.py", line 3, in <module>
File "/tmp/easy_install-vzgpp8in/distribute-0.7.3/pkg_resources.py", line 1518, in <module>
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pycharm-packaging11/dotenv/setup.py", line 23, in <module>
scripts=['scripts/dotenv']
File "/usr/lib/python3.6/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 1087, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 233, in run_setup
with setup_context(setup_dir):
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3.6/contextlib.py", line 99, 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 194, in setup_context
__import__('setuptools')
File "/tmp/easy_install-vzgpp8in/distribute-0.7.3/setuptools/__init__.py", line 2, in <module>
File "/tmp/easy_install-vzgpp8in/distribute-0.7.3/setuptools/extension.py", line 5, in <module>
File "/tmp/easy_install-vzgpp8in/distribute-0.7.3/setuptools/dist.py", line 7, in <module>
File "/tmp/easy_install-vzgpp8in/distribute-0.7.3/setuptools/command/__init__.py", line 8, in <module>
File "/tmp/easy_install-vzgpp8in/distribute-0.7.3/setuptools/command/install_scripts.py", line 3, in <module>
File "/tmp/easy_install-vzgpp8in/distribute-0.7.3/pkg_resources.py", line 1518, in <module>
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pycharm-packaging11/dotenv/"
Try installing "python-dotenv" package instead of "dotenv". This should solve the problem.
sudo pip install python-dotenv
Install python-dotenv and then import dotenv package instead of python-dotenv, because the latter doesn`t work

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