I have tried in vain to get gTTS working on my win10 machine.
I have upgraded pip.
i have run pip install gtts but all it installs is something called UNKNOWN
pip list gives me:
Package Version
------------- -------
aiohttp 1.0.5
async-timeout 3.0.1
asyncio 3.4.3
cffi 1.12.2
chardet 3.0.4
discord 0.16.12
discord.py 0.16.12
multidict 4.5.2
pip 19.0.3
pycparser 2.19
PyNaCl 1.3.0
pyttsx 1.1
setuptools 28.8.0
six 1.12.0
UNKNOWN 2.0.3
websockets 3.4
notice the UNKNOWN where my GTTS should be?
when i try install, i get this:
Collecting gTTS
Using cached https://files.pythonhosted.org/packages/e6/37/f55346a736278f0eb0ae9f7edee1a61028735ef0010db68a2e6fcd0ece56/gTTS-2.0.3.tar.gz
Generating metadata for package gTTS produced metadata for project name unknown. Fix your #egg=gTTS fragments.
Requirement already satisfied (use --upgrade to upgrade): unknown from https://files.pythonhosted.org/packages/e6/37/f55346a736278f0eb0ae9f7edee1a61028735ef0010db68a2e6fcd0ece56/gTTS-2.0.3.tar.gz#sha256=a6d4cf039da2797de8af2da7c1f0ce700ac0b48601ce6c11a02b337fd6bdcf57 in c:\users\user\appdata\local\programs\python\python36\lib\site-packages
And i cant call gTTS through from gtts import gTTS it just crashes my program every time.
Please, what am I doing wrong?
Use "pip install --upgrade gTTS"
So it looks like python generating metadata package for Googles Text-to-Speech gTTS. You now have use "--upgrade" to put the gTTS fragments of your first attempt at downloading gTTS together. You do this by calling:
"pip install --upgrade gTTS"
Hope this helps.
Related
I have some old code I'm trying to use which uses httplib2 Python lib. The same exact code works fine on Linux (e.g. Raspberry Pi).
I have used pip to uninstall the httplib2 lib and pip3 to re-install.
Here's what "pip list" (or "pip3 list") shows:
C:\Users\g7847>pip list
Package Version
----------------------- ---------
bcrypt 3.2.0
cachetools 4.2.4
certifi 2021.5.30
cffi 1.15.0
chardet 4.0.0
cryptography 36.0.0
cycler 0.10.0
google-auth 2.3.3
google-auth-httplib2 0.1.0
httplib2 0.20.2
idna 2.10
kiwisolver 1.3.1
matplotlib 3.4.2
numpy 1.21.0
paramiko 2.8.1
Pillow 8.3.1
pip 21.3.1
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.21
PyNaCl 1.4.0
pyparsing 2.4.7
python-dateutil 2.8.2
requests 2.25.1
requests-http-signature 0.2.0
rsa 4.8
setuptools 57.1.0
six 1.16.0
urllib3 1.26.6
wheel 0.36.2
C:\Users\g7847>
and yet:
C:\Users\g7847>python3 sshConnect.py
Traceback (most recent call last):
File "C:\Users\g7847\sshConnect.py", line 12, in <module>
import httplib2
ModuleNotFoundError: No module named 'httplib2 '
This is the import section at the beginning. The only library that is complained about is httlib2.
import json
import time
import subprocess
import datetime
import base64
import sys
import os
import getpass
import errno
import re
import string
import httplib2
pip and pip3 are not the same.
pip will use one of your Python versions depending on what exactly is first in the system PATH variable, whereas with pip3 you can be sure that the module will be installed in python3 library.
So, could you double check if the module is actually installed in the python3 library ?
If the module really is installed in python3 library, you could check if the PATH variable is correct.
(You can check the PATH by using the following : Reference)
The httplib2 library is part of the standard library in Python 3.
import httplib ImportError: No module named httplib
is it installed on version 2.x?
pip2 install httplib2
I still don't really know what was going on. I decided for other reasons to switch to the requests library rather than httplib2. My program runs OK inside Idle and I also made Windows EXE of it using pyinstaller on the command line. I thought I was having trouble running it directly as a Python program but I just checked it and it's fine.
One thing that MIGHT have been an issue is that I also have been using WSL (Ubuntu) in Windows and had installed httplib2 over there. I really don't know. I did uninstall that just in case but I'm not using httplib2 any more anyway.
There is a weird issue that happens if you run the Windows 3.9 installer from Python.org. If you subsequently try to run Python, then the Windows Store opens and you can't do anything except install that. So I uninstalled and reinstalled everything a few times but the last time it was just the Windows Store version as it seemed fairly insistent.
I am using MacBook m1 which is running Big Sur 11.1 ,and I have installed Xcode-commandline-tools version 12.3 and it has installed python3.8.5 and pip3 .python3 and pip are native apps,that is they run in ARM
pip3 version 20.3.3
python3 version 3.8.5
setuptools version 51.0.0
wheel version 0.36.2
when I type python3 -m pip install pandas
The output is :
Defaulting to user installation because normal site-packages is not writeable
Collecting pandas
Downloading pandas-1.2.0.tar.gz (5.4 MB)
|████████████████████████████████| 5.4 MB 150 kB/s
Installing build dependencies ... error
And with a very long list of error about 30,000 lines (only last few lines)
and
pip3 list output is
cppy 1.1.0
kiwisolver 1.3.1
numpy 1.20.0rc1
pip 20.3.3
pyparsing 2.4.7
python-dateutil 2.8.1
setuptools 51.0.0
six 1.15.0
wheel 0.36.2
Is pandas not yet supported or I am doing it wrong and same goes with Matplotlib.
Install Miniforge for arm64 (Apple Silicon)latest installer here: installer here
Now create a conda environment for whatever version you have (I'm running 3.9.2)
conda create -n cenv python=3.9.2
conda activate cenv
conda install pandas
You will drive yourself nuts trying to get all the different packages working if you try to go from wheels/pip, at time of writing.
I think I got pandas working but couldn't get matplotlib working due to kiwi solver issues. Use miniforge/conda. This is the way.
You can try installing pandas version 0.25.3. This is the most stable release of Pandas which brings in numpy 1.19.1 which is the most stable version of NUMPY.
try running pip install pandas==0.25.3, and it should install the required packages.
I'm using python 3.7 on my windows 10 system.I'm trying to install library reuqests. So I used following code
pip install requests
I got the error message
mystic 0.3.3 has requirement numpy<1.16.0,>=1.0, but you'll have numpy 1.16.2 which is incompatible.
Can you suggest me how to resolve this issue?
I got same issue during fastai package installation, uninstalled numpy and installing mystic package using anaconda prompt fixed the issue
pip uninstall numpy
pip install mystic
I am trying to use fastparquet to open a file, but I get the error:
RuntimeError: Decompression 'SNAPPY' not available. Options: ['GZIP', 'UNCOMPRESSED']
I have the following installed and have rebooted my interpreter:
python 3.6.5 hc3d631a_2
python-snappy 0.5.2 py36_0 conda-forge
snappy 1.1.7 hbae5bb6_3
fastparquet 0.1.5 py36_0 conda-forge
Everything downloaded smoothly. I didn't know if I needed snappy or python-snappy so I got one had no fix and got the other, still with no success. All related issues I have found are fixed when downloading snappy, but I am still getting this error with having two snappys! Any help would be appreciated.
Run:
pip install python-snappy
pip install pyarrow
It should do the trick.
I think you lack the pyarrow package.
If you have an error with pip, use conda instead (i.e., conda install python-snappy or if you still have errors conda install -c conda-forge python-snappy).
You need to install python-snappy as stated by the response of Catbuilts. However, it is only a wrapper around the snappy implementation in c that should be installed in your computer, this issue has been addressed in this answer about installing snappy-c.
Assuming you have a DEB-based system, such as ubuntu, you can get it with:
sudo apt-get install libsnappy-dev
python3 -m pip install --user python-snappy
To test it, you can try the following script:
import pandas as pd
import snappy # Not required but snappy (python-snappy) module should be reachable
from fastparquet import write, ParquetFile
df = pd.DataFrame({"col1": [1,2,3,4], "col2": ["a","b","c","d"]})
# df.head() # Test your initial value
write("/tmp/deleteme", df, compression="SNAPPY")
df_parquet = ParquetFile("/tmp/deleteme").to_pandas()
df_parquet.head()
The following installations are pretty helpful
pip install fastparquet
pip install python-snappy
pip install pyarrow
I am trying to install nibabel through pip:
pip install nibabel
It installs successfully, however, when I write the following code:
import nibabel as nib
I get this error :
ImportError: No module named 'nibabel'
And when I check in the terminal using:
pip show nibabel
It shows that it exists
Author-email: neuroimaging#python.org
License: MIT license
Location: /usr/local/lib/python3.6/site-packages
Requires: numpy, six
This issue happens in both Python 3.x and 2.x.
Here's what you can do:
If you're using Python 2.7, you might need root permission to install the nibabel module.
Try this:
pip install nibabel --user
Hopefully, you should get this Successfully installed nibabel-2.2.1 message.
Then, run your Python 2.7 environment and:
import nibabel as nib
If this doesn't help, you might want to try virtualenv.
Finally, double check if you meet the nibabel requirements e.g. Python 2.7, or >= 3.4.