How can I solve installation error of gTTS? - pip

AssertionError: gTTS .dist-info directory not found while installing gTTS
(venv) D:\gui>pip install gTTS
Collecting gTTS
Installing collected packages: gTTS
Exception:
Traceback (most recent call last):
File "d:\gui\venv\lib\site-packages\pip\_internal\cli\base_command.py", line 143, in main
status = self.run(options, args)
File "d:\gui\venv\lib\site-packages\pip\_internal\commands\install.py", line 366, in run
use_user_site=options.use_user_site,
File "d:\gui\venv\lib\site-packages\pip\_internal\req\__init__.py", line 49, in install_given_reqs
**kwargs
File "d:\gui\venv\lib\site-packages\pip\_internal\req\req_install.py", line 760, in install
use_user_site=use_user_site, pycompile=pycompile,
File "d:\gui\venv\lib\site-packages\pip\_internal\req\req_install.py", line 382, in move_wheel_files
warn_script_location=warn_script_location,
File "d:\gui\venv\lib\site-packages\pip\_internal\wheel.py", line 326, in move_wheel_files
assert info_dir, "%s .dist-info directory not found" % req
AssertionError: gTTS .dist-info directory not found

Following Steps can be done:
a) Upgrading the setuptools
pip3 install setuptools --upgrade
b) Upgrading the pip
pip3 install pip --upgrade
c) Install gtts again, clearing pip cache
pip3 install --no-cache-dir gTTS
Hope it helps.

Related

problems installing pip3 install virtualenvwrapper

I am using ubuntu 16.04, what and installed for the first time and I try to install pip3 install virtualenvwrapper for it tells me to install first sudo apt install python3-pip once you install it I run the command pip3 install virtualenvwrapper but it generates the following error.
Collecting virtualenvwrapper
Downloading https://files.pythonhosted.org/packages/c1/6b/2f05d73b2d2f2410b48b90d3783a0034c26afa534a4a95ad5f1178d61191/virtualenvwrapper-4.8.4.tar.gz (334kB)
100% |████████████████████████████████| 337kB 233kB/s
Complete output from command python setup.py egg_info:
Couldn't find index page for 'pbr' (maybe misspelled?)
No local packages or download links found for pbr
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-xwa__f7e/virtualenvwrapper/setup.py", line 7, in <module>
pbr=True,
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 657, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-xwa__f7e/virtualenvwrapper/

Pythonanywhere install modules permission denied error

How do you install upstox? pip install upstox is not installing the module on a bash console.
11:54 ~ $ pip install upstox
Collecting upstox
Using cached upstox-1.5.5-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/local/lib/python2.7/dist-packages (from upstox)
Requirement already satisfied (use --upgrade to upgrade): future in /usr/local/lib/python2.7/dist-packages (from upstox)
Collecting websocket-client (from upstox)
Using cached websocket_client-0.46.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): argparse in /usr/lib/python2.7 (from future->upstox)
Requirement already satisfied (use --upgrade to upgrade): importlib in /usr/local/lib/python2.7/dist-packages (from future->upstox)
Requirement already satisfied (use --upgrade to upgrade): six in /usr/local/lib/python2.7/dist-packages (from websocket-client->upstox)
Installing collected packages: websocket-client, upstox
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 742, in install
**kwargs
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 831, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 1032, in move_wheel_files
isolated=self.isolated,
File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 346, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 317, in clobber
ensure_dir(destdir)
File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/websocket_client-0.46.0.dist-info'
11:54 ~ $
This help page on the PythonAnywhere site has instructions on a couple of extra things you need to do when using pip to install stuff there. Essentially, you either need to use the --user flag or use a virtualenv.
just use --user flag example:
pip3 install --user django-js-reverse

How can I resolve this issue regarding upgradation of pip on ubuntu 16.04?

Here is what happened.I even tried to remove pip, but it shows the same problem.My python version is 2.7.12
saikat#saikat:~$ pip install --upgrade pip
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 8.1.2
Uninstalling pip-8.1.2:
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 736, in install
requirement.uninstall(auto_confirm=True)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 742, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/shutil.py", line 303, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/bin/pip'
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
try this.
wget https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/pip-8.1.2.tar.gz
tar -xzvf pip-8.1.2.tar.gz
cd pip-8.1.2
sudo python setup.py install
It should help

Not being able to install LinkChecker

I'm having issues installing broken link-checker.
When I do 'sudo pip install LinkChecker' like said in installation, I get following error
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-uBq7xh/LinkChecker/setup.py", line 95, in <module>
import py2app
File "/Library/Python/2.7/site-packages/py2app/__init__.py", line 31, in <module>
__version__ = pkg_resources.require('py2app')[0].version
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 968, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 854, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'macholib>=1.4' distribution was not found and is required by py2app
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-uBq7xh/LinkChecker/
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The error message you get suggests you fail to meet the dependencies needed for the package you're installing.
Try installing macholib and upgrading pip, as suggested by the log
pip install macholib
pip install --upgrade pip

pip install to a local folder

Is it possible to install packages to any arbitrary folder? e.g. I tried to install a package to a local folder but it throws error, same error comes up with any other package
/tmp$ pip install --install-option="--prefix=mypython" IPy
Downloading/unpacking IPy
Downloading IPy-0.75.tar.gz
Running setup.py egg_info for package IPy
Installing collected packages: IPy
Running setup.py install for IPy
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 250, in run
requirement_set.install(install_options, global_options)
File "/usr/local/lib/python2.7/dist-packages/pip-1.1-py2.7.egg/pip/req.py", line 1133, in install
requirement.install(install_options, global_options)
File "/usr/local/lib/python2.7/dist-packages/pip-1.1-py2.7.egg/pip/req.py", line 604, in install
f = open(os.path.join(egg_info_dir, 'installed-files.txt'), 'w')
IOError: [Errno 2] No such file or directory: 'mypython/lib/python2.7/site-packages/IPy-0.75-py2.7.egg-info/installed-files.txt'
Also this question indicate it should be working, so what is wrong here?
--prefix= needs to be an absolute path. Doing:
$ pip install --install-option="--prefix=/tmp/mypython" IPy
for example, should work without any errors.

Resources