FileNotFoundError while installing pocketsphinx via anaconda - python

C:\Windows\System32>"C:\Users\Dinesh Kumar\AppData\Local\Programs\Python\Python3
6-32\python.exe" -m pip install pocketsphinx-0.1.3-cp36-cp36m-win32.whl
Requirement 'pocketsphinx-0.1.3-cp36-cp36m-win32.whl' looks like a filename, but
the file does not exist
Processing c:\windows\system32\pocketsphinx-0.1.3-cp36-cp36m-win32.whl
Exception:
Traceback (most recent call last):
File "C:\Users\Dinesh Kumar\AppData\Local\Programs\Python\Python36-32\lib\site
-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\Dinesh Kumar\AppData\Local\Programs\Python\Python36-32\lib\site
-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "C:\Users\Dinesh Kumar\AppData\Local\Programs\Python\Python36-32\lib\site
-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "C:\Users\Dinesh Kumar\AppData\Local\Programs\Python\Python36-32\lib\site
-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\Dinesh Kumar\AppData\Local\Programs\Python\Python36-32\lib\site
-packages\pip\req\req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "C:\Users\Dinesh Kumar\AppData\Local\Programs\Python\Python36-32\lib\site
-packages\pip\download.py", line 809, in unpack_url
unpack_file_url(link, location, download_dir, hashes=hashes)
File "C:\Users\Dinesh Kumar\AppData\Local\Programs\Python\Python36-32\lib\site
-packages\pip\download.py", line 715, in unpack_file_url
unpack_file(from_path, location, content_type, link)
File "C:\Users\Dinesh Kumar\AppData\Local\Programs\Python\Python36-32\lib\site
-packages\pip\utils\__init__.py", line 599, in unpack_file
flatten=not filename.endswith('.whl')
File "C:\Users\Dinesh Kumar\AppData\Local\Programs\Python\Python36-32\lib\site
-packages\pip\utils\__init__.py", line 482, in unzip_file
zipfp = open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Windows\\System32\\
pocketsphinx-0.1.3-cp36-cp36m-win32.whl'
This was the error when I typed those 2 commands. I have the file in the right directory but it is showing like file does not exist.
I have downloaded the right file according to the following commands.
"C:\Users\krush\Anaconda3\python.exe" --version
"C:\Users\krush\Anaconda3\python.exe" -c "importstruct;print(struct.calcsize('P') * 8)"

download it from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pocketsphinx
then install the package by following command:
python -m pip install pocketsphinx-0.1.3-cp36-cp36m-win32.whl

Related

Strange exception while using pip to install python packages after deleting rabbitmq in Ubuntu 18.04

Good morining,
I was trying to install RabbitMQ in my Ubuntu18.04 but it was like brain surgery. I have decided to remove everything, but now when I try to install python packages with pip, the terminal return strange exceptions. I have similar problems when I try to compile a python script with visualStudio. I really appreciate your help. Stay tech!
These are the exceptions:
pip3 install numpy
Collecting numpy
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python3/dist-packages/pip/index.py", line 795, in get_page
resp.raise_for_status()
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://packagecloud.io/rabbitmq/rabbitmq-server/pypi/simple/numpy/
There is an excessive URL in ~/.pip/pip.conf or ~/.config/pip/pip.conf. Remove it and retry.

problems installing Theano with Anaconda3 (Python version 3.6)

I have tried to install theano as indicated in the instruction
typing pip install theano on the Anaconda prompt
I have encountered the following issue.
It gave me these errors:
(base) C:\Users >pip install theano
Collecting theano
Exception:
Traceback (most recent call last):
File "C:\Users\Anaconda3\lib\site-packages\pip\basecommand.py", line
215, in main
status = self.run(options, args)
File "C:\Users\Anaconda3\lib\site-packages\pip\commands\install.py",
line 335, in run
wb.build(autobuilding=True)
File "C:\Users\Anaconda3\lib\site-packages\pip\wheel.py", line 749, i
n build
self.requirement_set.prepare_files(self.finder)
File "C:\Users\Anaconda3\lib\site-packages\pip\req\req_set.py", line
380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\Anaconda3\lib\site-packages\pip\req\req_set.py", line
554, in _prepare_file
require_hashes
File "C:\Users\Anaconda3\lib\site-packages\pip\req\req_install.py", l
ine 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "C:\Users\Anaconda3\lib\site-packages\pip\index.py", line 465, i
n find_requirement
all_candidates = self.find_all_candidates(req.name)
File "C:\Users\Anaconda3\lib\site-packages\pip\index.py", line 423, i
n find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "C:\Users\Anaconda3\lib\site-packages\pip\index.py", line 568, i
n _get_pages
page = self._get_page(location)
File "C:\Users\Anaconda3\lib\site-packages\pip\index.py", line 683, i
n _get_page
return HTMLPage.get_page(link, session=self.session)
File "C:\Users\Anaconda3\lib\site-packages\pip\index.py", line 811, i
n get_page
inst = cls(resp.content, resp.url, resp.headers)
File "C:\Users\Anaconda3\lib\site-packages\pip\index.py", line 731, i
n __init__
namespaceHTMLElements=False,
TypeError: parse() got an unexpected keyword argument 'transport_encoding'
what can I do ??
I had the same problem. In my case updating pip worked.
conda update pip

Cannot create Virtualenv in Python

I'm struggling with virtualenv in Python.
After virtualenv _env I get:
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/marcin/Documents/Projects/django_tutorial/_env/bin/python2
Also creating executable in /home/marcin/Documents/Projects/django_tutorial/_env/bin/python
Installing setuptools, pkg_resources, pip, wheel...
Complete output from command /home/marcin/Documen...ial/_env/bin/python2 - setuptools pkg_resources pip wheel:
Collecting setuptools
Downloading setuptools-38.4.0-py2.py3-none-any.whl (489kB)
Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 659, in unpack_http_url
hashes)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/utils/hashes.py", line 46, in check_against_chunks
for chunk in chunks:
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 571, in written_chunks
for chunk in chunks:
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/utils/ui.py", line 139, in iter
for x in it:
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 560, in resp_read
decode_content=False):
File "/home/marcin/Documents/Projects/django_tutorial/_env/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 432, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/marcin/Documents/Projects/django_tutorial/_env/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 397, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/home/marcin/Documents/Projects/django_tutorial/_env/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 312, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.
----------------------------------------
...Installing setuptools, pkg_resources, pip, wheel...done.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 2375, in <module>
main()
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 724, in main
symlink=options.symlink)
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 992, in create_environment
download=download,
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 922, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 817, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/marcin/Documen...ial/_env/bin/python2 - setuptools pkg_resources pip wheel failed with error code 2
I've got:
virtualenv 15.1.0
pip 9.0.1
Python 2.7.13
I'm out of ideas. I tried exporting locales, reinstalling pip, setuptools and virtualenv.
Do you have any suggestions? I will be grateful.
If you are in China, you can change your pip source to solve this issue.
mkdir ~/.pip
echo '[global]' > ~/.pip/pip.conf
echo 'index-url = https://pypi.tuna.tsinghua.edu.cn/simple' >> ~/.pip/pip.conf
By using the mirror of Tsinghua University, you might solve your problem.

Alphavantage library installation issue on conda environment

I am trying to install alphavantage library on a conda environment downgraded to py3.5 and it throws exception while installing. TypeError: parse() got an unexpected keyword argument ‘transport_encoding’
Also tried cloning the repo and installing via pip didn't work.
Exception:
Traceback (most recent call last):
File "C:\Users\vignesh\Anaconda3\envs\tensorflow\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\vignesh\Anaconda3\envs\tensorflow\lib\site-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "C:\Users\vignesh\Anaconda3\envs\tensorflow\lib\site-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "C:\Users\vignesh\Anaconda3\envs\tensorflow\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\Users\vignesh\Anaconda3\envs\tensorflow\lib\site-packages\pip\req\req_set.py", line 554, in _prepare_file
require_hashes
File "C:\Users\vignesh\Anaconda3\envs\tensorflow\lib\site-packages\pip\req\req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "C:\Users\vignesh\Anaconda3\envs\tensorflow\lib\site-packages\pip\index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "C:\Users\vignesh\Anaconda3\envs\tensorflow\lib\site-packages\pip\index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "C:\Users\vignesh\Anaconda3\envs\tensorflow\lib\site-packages\pip\index.py", line 568, in _get_pages
page = self._get_page(location)
File "C:\Users\vignesh\Anaconda3\envs\tensorflow\lib\site-packages\pip\index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "C:\Users\vignesh\Anaconda3\envs\tensorflow\lib\site-packages\pip\index.py", line 811, in get_page
inst = cls(resp.content, resp.url, resp.headers)
File "C:\Users\vignesh\Anaconda3\envs\tensorflow\lib\site-packages\pip\index.py", line 731, in __init__
namespaceHTMLElements=False,
TypeError: parse() got an unexpected keyword argument 'transport_encoding'

Encoding error when attempt to install matplotlib on ubuntu

I'm attempting to install matplotlib in a python2 virtualenv in Ubuntu 14.04, and am running into the following error:
../virtualenv/bin/pip install matplotlib
Traceback (most recent call last):
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/basecommand.py", line 211, in main
status = self.run(options, args)
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/commands/install.py", line 305, in run
wb.build(autobuilding=True)
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/wheel.py", line 705, in build
self.requirement_set.prepare_files(self.finder)
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 334, in prepare_files
functools.partial(self._prepare_file, finder))
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 321, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 491, in _prepare_file
session=self.session)
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/download.py", line 825, in unpack_url
session,
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/download.py", line 673, in unpack_http_url
from_path, content_type = _download_http_url(link, session, temp_dir)
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/download.py", line 886, in _download_http_url
_download_url(resp, link, content_file)
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/download.py", line 621, in _download_url
for chunk in progress_indicator(resp_read(4096), 4096):
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/utils/ui.py", line 133, in iter
for x in it:
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/download.py", line 586, in resp_read
decode_content=False):
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 307, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 243, in read
data = self._fp.read(amt)
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 54, in read
self.__callback(self.__buf.getvalue())
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py", line 224, in cache_response
self.serializer.dumps(request, response, body=body),
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 49, in dumps
"body": _b64_encode_bytes(body),
File "/home/me/sites/dashboard.mysite.com/virtualenv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 12, in _b64_encode_bytes
return base64.b64encode(b).decode("ascii")
MemoryError
Any thoughts about what might be going on and why I am getting a Memory Error?
This appears to be the MemoryError while trying to install a large package (matplotlib) in a low memory environment. It appears that the cause is the caching mechanism, as disabling the cache fixes the issue.
Try this:
pip install --no-cache-dir matplotlib

Categories