error pip install scipy on command prompt - scipy

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\akbar>sudo -i
'sudo' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\akbar>pip install scipy
Collecting scipy
Using cached scipy-0.19.0.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\akbar\AppData\Local\Temp\pip-build-yr7qne_9\scipy\setup.py", line 416, in <module>
setup_package()
File "C:\Users\akbar\AppData\Local\Temp\pip-build-yr7qne_9\scipy\setup.py", line 412, in setup_package
setup(**metadata)
File "C:\Users\akbar\Miniconda3\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\dist.py", line 315, in __init__
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\dist.py", line 361, in fetch_build_eggs
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\pkg_resources\__init__.py", line 851, in resolve
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\pkg_resources\__init__.py", line 1123, in best_match
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\pkg_resources\__init__.py", line 1135, in obtain
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\dist.py", line 428, in fetch_build_egg
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\command\easy_install.py", line 652, in easy_install
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\package_index.py", line 635, in fetch_distribution
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\package_index.py", line 616, in find
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\package_index.py", line 559, in download
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\package_index.py", line 804, in _download_url
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\package_index.py", line 810, in _attempt_download
File "C:\Users\akbar\Miniconda3\lib\site-packages\setuptools-27.2.0-py3.6.egg\setuptools\package_index.py", line 725, in _download_to
File "C:\Users\akbar\Miniconda3\lib\http\client.py", line 449, in read
n = self.readinto(b)
File "C:\Users\akbar\Miniconda3\lib\http\client.py", line 493, in readinto
n = self.fp.readinto(b)
File "C:\Users\akbar\Miniconda3\lib\socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "C:\Users\akbar\Miniconda3\lib\ssl.py", line 1002, in recv_into
return self.read(nbytes, buffer)
File "C:\Users\akbar\Miniconda3\lib\ssl.py", line 865, in read
return self._sslobj.read(len, buffer)
File "C:\Users\akbar\Miniconda3\lib\ssl.py", line 625, in read
v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
Command python setup.py egg_info failed with error code 1 in C:\Users\akbar\AppData\Local\Temp\pip-build-yr7qne_9\scipy\
C:\Users\akbar>sd
i have no idea what should i do

You can install scipy in Windows from a binary
or any of the scientific python distributions (recommended).
However, looks like a network error. So try pip install scipy --no-cache-dir to skip install from cache.

Related

ckan.plugins.core.PluginNotFoundException: pdf_view Error

I installed CKAN 2.8.5 from package on Ubuntu 16.04. I activated the ckanext-pdfview. Everything is OK. Bu t when I run paster commands I received the below error.
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/paster", line 8, in <module>
sys.exit(run())
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
result = self.command()
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 1108, in command
self._load_config()
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 330, in _load_config
self.site_user = load_config(self.options.config, load_site_user)
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 237, in load_config
load_environment(conf.global_conf, conf.local_conf)
File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 116, in load_environment
p.load_all()
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 140, in load_all
load(*plugins)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 154, in load
service = _get_service(plugin)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 257, in _get_service
raise PluginNotFoundException(plugin_name)
ckan.plugins.core.PluginNotFoundException: pdf_view
I found the solution. When I entered into the virtual environment I ran the pip command with path. First I found the path with which pip command in the virtual env and then I ran the pip command with path.

Apache Beam Python wordcount example errors on Windows10

I am running Anaconda - conda virtual env with Python 2.7
I have followed Apache Beam Python SDK Quickstart
When I run -
'python -m apache_beam.examples.wordcount --input C:\Users\simon_6dagkya\OneDrive\ProgrammingCore\Apache Beam\examples\wordcount\kinglear.txt --output C:\Users\simon_6dagkya\OneDrive\ProgrammingCore\Apache Beam\examples\wordcount\output.txt'
I get following error:
INFO:root:Missing pipeline option (runner). Executing pipeline using the default runner: DirectRunner.
Traceback (most recent call last):
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\examples\wordcount.py", line 136, in <module>
run()
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\examples\wordcount.py", line 90, in run
lines = p | 'read' >> ReadFromText(known_args.input)
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\io\textio.py", line 524, in __init__
skip_header_lines=skip_header_lines)
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\io\textio.py", line 119, in __init__
validate=validate)
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\io\filebasedsource.py", line 121, in __init__
self._validate()
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\options\value_provider.py", line 133, in _f
return fnc(self, *args, **kwargs)
File "C:\Users\simon_6dagkya\Anaconda3\envs\apachebeam\lib\site-packages\apache_beam\io\filebasedsource.py", line 181, in _validate
'No files found based on the file pattern %s' % pattern)
IOError: No files found based on the file pattern C:\Users\simon_6dagkya\OneDrive\ProgrammingCore\Apache
Any help most appreciated.
IOError: No files found based on the file pattern C:\Users\simon_6dagkya\OneDrive\ProgrammingCore\Apache
Your input string has a space in it. Add quotes.

h5py installation - ImportError: DLL load failed

I am having trouble in installing h5py on my Windows machine. I am getting an error message that says: "ImportError: DLL load failed: The specified module could not be found.". I would greatly appreciate if someone could explain how to fix this issue.
Here is the complete log:
Downloading/unpacking h5py
Running setup.py egg_info for package h5py
running egg_info
writing requirements to pip-egg-info\h5py.egg-info\requires.txt
writing pip-egg-info\h5py.egg-info\PKG-INFO
writing top-level names to pip-egg-info\h5py.egg-info\top_level.txt
writing dependency_links to pip-egg-info\h5py.egg-info\dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info\h5py.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pip-egg-info\h5py.egg-info\SOURCES.txt'
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6.1 in c:\program files (x86)\enthought\canopy32\app\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages (from h5py)
Requirement already satisfied (use --upgrade to upgrade): Cython>=0.17 in c:\program files (x86)\enthought\canopy32\app\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages (from h5py)
Downloading/unpacking six (from h5py)
Running setup.py egg_info for package six
running egg_info
writing pip-egg-info\six.egg-info\PKG-INFO
writing top-level names to pip-egg-info\six.egg-info\top_level.txt
writing dependency_links to pip-egg-info\six.egg-info\dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info\six.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'documentation\_build'
writing manifest file 'pip-egg-info\six.egg-info\SOURCES.txt'
Source in c:\users\ibm_admin\build\six has version 1.9.0, which satisfies requirement six (from h5py)
Installing collected packages: h5py, six
Running setup.py install for h5py
Running command C:\Users\IBM_ADMIN\AppData\Local\Enthought\Canopy32\User\Scripts\python.exe -c "import setuptools;__file__='C:\\Users\\IBM_ADMIN\\build\\h5py\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record c:\users\ibm_ad~1\appdata\local\temp\pip-05nf1z-record\install-record.txt
running install
running build
running build_py
running build_ext
********************************************************************************
Summary of the h5py configuration
Path to HDF5: None
HDF5 Version: '1.8.4'
MPI Enabled: False
Rebuild Required: False
********************************************************************************
Executing cythonize()
Autodetection skipped [[Error 126] The specified module could not be found]
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\IBM_ADMIN\build\h5py\setup.py", line 140, in <module>
cmdclass = CMDCLASS,
File "C:\Python27\Lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\Lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Python27\Lib\distutils\command\install.py", line 563, in run
self.run_command('build')
File "C:\Python27\Lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\Lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "C:\Python27\Lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "setup_build.py", line 172, in run
self.extensions = cythonize(self._make_extensions(config),
File "setup_build.py", line 72, in _make_extensions
import numpy
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\__init__.py", line 168, in <module>
from . import add_newdocs
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\lib\__init__.py", line 18, in <module>
from .polynomial import *
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\lib\polynomial.py", line 19, in <module>
from numpy.linalg import eigvals, lstsq, inv
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\linalg\__init__.py", line 50, in <module>
from .linalg import *
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\linalg\linalg.py", line 29, in <module>
from numpy.linalg import lapack_lite, _umath_linalg
ImportError: DLL load failed: The specified module could not be found.
Complete output from command C:\Users\IBM_ADMIN\AppData\Local\Enthought\Canopy32\User\Scripts\python.exe -c "import setuptools;__file__='C:\\Users\\IBM_ADMIN\\build\\h5py\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record c:\users\ibm_ad~1\appdata\local\temp\pip-05nf1z-record\install-record.txt:
running install
running build
running build_py
running build_ext
Summary of the h5py configuration
Path to HDF5: None
HDF5 Version: '1.8.4'
MPI Enabled: False
Rebuild Required: False
Executing cythonize()
Autodetection skipped [[Error 126] The specified module could not be found]
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\IBM_ADMIN\build\h5py\setup.py", line 140, in <module>
cmdclass = CMDCLASS,
File "C:\Python27\Lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\Lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Python27\Lib\distutils\command\install.py", line 563, in run
self.run_command('build')
File "C:\Python27\Lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\Lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "C:\Python27\Lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "setup_build.py", line 172, in run
self.extensions = cythonize(self._make_extensions(config),
File "setup_build.py", line 72, in _make_extensions
import numpy
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\__init__.py", line 168, in <module>
from . import add_newdocs
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\lib\__init__.py", line 18, in <module>
from .polynomial import *
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\lib\polynomial.py", line 19, in <module>
from numpy.linalg import eigvals, lstsq, inv
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\linalg\__init__.py", line 50, in <module>
from .linalg import *
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\numpy\linalg\linalg.py", line 29, in <module>
from numpy.linalg import lapack_lite, _umath_linalg
ImportError: DLL load failed: The specified module could not be found.
----------------------------------------
Command C:\Users\IBM_ADMIN\AppData\Local\Enthought\Canopy32\User\Scripts\python.exe -c "import setuptools;__file__='C:\\Users\\IBM_ADMIN\\build\\h5py\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record c:\users\ibm_ad~1\appdata\local\temp\pip-05nf1z-record\install-record.txt failed with error code 1
Exception information:
Traceback (most recent call last):
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\pip\basecommand.py", line 126, in main
self.run(options, args)
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\pip\commands\install.py", line 228, in run
requirement_set.install(install_options, global_options)
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\pip\req.py", line 1100, in install
requirement.install(install_options, global_options)
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\pip\req.py", line 572, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "C:\Program Files (x86)\Enthought\Canopy32\App\appdata\canopy-1.3.0.1715.win-x86\lib\site-packages\pip\__init__.py", line 255, in call_subprocess
% (command_desc, proc.returncode))
InstallationError: Command C:\Users\IBM_ADMIN\AppData\Local\Enthought\Canopy32\User\Scripts\python.exe -c "import setuptools;__file__='C:\\Users\\IBM_ADMIN\\build\\h5py\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record c:\users\ibm_ad~1\appdata\local\temp\pip-05nf1z-record\install-record.txt failed with error code 1

IPython Notebook (Jupyter) Bash Kernel raising FileNotFoundError with Python3

Recently upgraded to Anaconda Python3 but now when I try to launch a new notebook with the bash kernel I get the below traceback indicating that it is looking still for my previous python interpreter. Not sure how this can be updated to point to my new python in anaconda3 folder. Any help would be appreciated.
[E 10:40:58.086 NotebookApp] Unhandled error in API request
Traceback (most recent call last):
File "/ebs/anaconda3/lib/python3.4/site-packages/IPython/html/base/handlers.py", line 365, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/ebs/anaconda3/lib/python3.4/site-packages/IPython/html/services/sessions/handlers.py", line 53, in post
model = sm.create_session(path=path, kernel_name=kernel_name)
File "/ebs/anaconda3/lib/python3.4/site-packages/IPython/html/services/sessions/sessionmanager.py", line 66, in create_session
kernel_name=kernel_name)
File "/ebs/anaconda3/lib/python3.4/site-packages/IPython/html/services/kernels/kernelmanager.py", line 84, in start_kernel
kernel_name=kernel_name, **kwargs)
File "/ebs/anaconda3/lib/python3.4/site-packages/IPython/kernel/multikernelmanager.py", line 112, in start_kernel
km.start_kernel(**kwargs)
File "/ebs/anaconda3/lib/python3.4/site-packages/IPython/kernel/manager.py", line 240, in start_kernel
**kw)
File "/ebs/anaconda3/lib/python3.4/site-packages/IPython/kernel/manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/ebs/anaconda3/lib/python3.4/site-packages/IPython/kernel/launcher.py", line 213, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/ebs/anaconda3/lib/python3.4/subprocess.py", line 859, in __init__
restore_signals, start_new_session)
File "/ebs/anaconda3/lib/python3.4/subprocess.py", line 1457, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/root/anaconda/bin/python'
Use a symbolic link to achieve this:
ln -s /path/to/old/binary /path/to/new/binary
If you receive an insufficient permissions error, prepend sudo to the command.
In your case, you should symlink /root/anaconda/bin/python to the binary in your anaconda folder.

Error when creating virtualenv folder

I am working through the book Test Driven Devlopement, and am currently having a problem when I try to create a virtualenv folder using:
virtualenv --python=python3 ../virtualenv
I keep on getting this output:
Traceback (most recent call last):
File "C:\Python33\lib\runpy.py", line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python33\lib\runpy.py", line 73, in _run_code
exec(code, run_globals)
File "C:\Python33\Scripts\virtualenv.exe\__main__.py", line 9, in <module>
File "C:\Python33\lib\site-packages\virtualenv.py", line 774, in main
interpreter = resolve_interpreter(options.python)
File "C:\Python33\lib\site-packages\virtualenv.py", line 1575, in resolve_interpreter
python_versions = get_installed_pythons()
File "C:\Python33\lib\site-packages\virtualenv.py", line 93, in get_installed_pythons
path = winreg.QueryValue(python_core, "%s\\InstallPath" % ver)
FileNotFoundError: [WinError 2] The system cannot find the file specified
You are on windows: ../virutalenv is for unix
On unix, you are telling virtualenv to create a virtualenv directory in the directory up one level (previous) also windows uses backslash instead of slash.
Try to find a tutorial that is windows oriented, or if you can get your hand on a unix/linux machine, or maybe install cygwin.