Pyttsx3 is not installing on Windows - python-3.x

I have python 3.7.6 installed and when I try to install pyttsx3 on my windows 10, I had an error, that I need mac os, but it installing on another computer with windows. I have tried to reinstall python and cleared pip cache, but it didn't work.
This is an error:
ERROR: Command errored out with exit status 1:
command: 'c:\users\pfkcs\appdata\local\programs\python\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\pfkcs\AppData\Local\Temp\pip-install-y_mkf7t4\pyobjc-core\setup.py'"'"'; file='"'"'C:\Users\pfkcs\AppData\Local\Temp\pip-install-y_mkf7t4\pyobjc-core\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\pfkcs\AppData\Local\Temp\pip-install-y_mkf7t4\pyobjc-core\
Complete output (2 lines):
running egg_info
error: PyObjC requires macOS to build
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

try pip install -U pyttsx3
If still not working, you may have to install a specific version of pyttsx3. The most stable previous version is 2.71, you can install it by pip install -U pyttsx3==2.71
Hope this works.

It might help to run your Python code in an virtual env, by either anaconda if you have it installed: conda create -n <venv name> python=3.6 or python -m venv . if you do not have anaconda. Then either pip install pyttsx3 or py -m pip install pyttsx3 if the other doesn't work

First you have to install Python for windows extension. click here to download
Then you’ll need to give your virtualenv access to the system site-packages in order to install pyttsx.:
virtualenv --system-site-packages myproj
. myproj/bin/activate
pip install pyttsx
may be this could help you

Related

Dagster Installation on MacOS Big Sur

I am trying to install Dagster and Dagit using:python3 -m pip install dagster dagit --user
But, Always when it starts to build wheel for grpcio, it throws an error and stops the installation.
ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cb/vkzjvbbn2l5gbb31y3m61d_40000gp/T/pip-install-3005iws8/grpcio/setup.py'"'"'; __file__='"'"'/private/var/folders/cb/vkzjvbbn2l5gbb31y3m61d_40000gp/T/pip-install-3005iws8/grpcio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/cb/vkzjvbbn2l5gbb31y3m61d_40000gp/T/pip-record-8m4mi_rs/install-record.txt --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.
Is anyone using Dagster and Dagit on Mac?
EDIT: I was able to install Dagster by providing the required version in my requirements.txt File.
Upgraded the Pip to the latest version bypython3 -m pip install --user --upgrade pip and then installed Dagster!
It worked.
The main installation steps for Dagster are outlined here: https://docs.dagster.io/getting-started/install#installation - however users with M1 Macs have run into issues recently (early 2023) related to grpcio package installation.
If you encounter that issue, you will need this command:
pip install dagster dagit --find-links=https://github.com/dagster-io/build-grpcio/wiki/Wheels

pygame 2.0.0 installation error on m1 macOS Big Sur

I used python3 -m pip install pygame==2.0.0 via non-rosetta terminal and got these errors:
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/python#3.9/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1q/4hfh5j_d715b0vm49lql6vl80000gn/T/pip-install-cqq2oily/pygame_3a311b7a5339480eb6bae08f88ff3fe6/setup.py'"'"'; __file__='"'"'/private/var/folders/1q/4hfh5j_d715b0vm49lql6vl80000gn/T/pip-install-cqq2oily/pygame_3a311b7a5339480eb6bae08f88ff3fe6/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/1q/4hfh5j_d715b0vm49lql6vl80000gn/T/pip-pip-egg-info-ig7pjjbc
cwd: /private/var/folders/1q/4hfh5j_d715b0vm49lql6vl80000gn/T/pip-install-cqq2oily/pygame_3a311b7a5339480eb6bae08f88ff3fe6/
ERROR: Could not find a version that satisfies the requirement pygame==2.0.0
ERROR: No matching distribution found for pygame==2.0.0
My homebrew, pip3 are all up to date.
Any help would be appreciated!
I already had the same problem: the pip module only detected a pygame version older than 2.0.0.
It always installed pygame 1.9.6.
Maybe you should:
1. Upgrade pip
I don't know how pip works, but I updated it by typing
python3 -m pip install --upgrade pip
Then, when I typed again
python3 -m pip install pygame
pip downloaded the 2.0.1 version of pygame correctly.
2. Check your internet connection
Of course the modules come from Internet.

google buildpack psycopg2-binary Error: pg_config executable not found

This is in my requirements.txt
psycopg2-binary==2.8.3 # via -r requirements/base.in
that I am building inside docker image. I was under impression that if I install psycopg2-binary vs psycopg2 I should not install additional postgresql devel libs. Am I wrong?
pack build --builder=gcr.io/buildpacks/builder:v1 test-python
Collecting psycopg2-binary==2.8.3
Downloading psycopg2-binary-2.8.3.tar.gz (378 kB)
ERROR: Command errored out with exit status 1:
command: /layers/google.python.runtime/python/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-z7z_l56l/psycopg2-binary_ddfc5ed05bb44cf4b7e2f14d634bd6ae/setup.py'"'"'; __file__='"'"'/tmp/pip-install-z7z_l56l/psycopg2-binary_ddfc5ed05bb44cf4b7e2f14d634bd6ae/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-vsc_2hlv
cwd: /tmp/pip-install-z7z_l56l/psycopg2-binary_ddfc5ed05bb44cf4b7e2f14d634bd6ae/
Complete output (23 lines):
running egg_info
creating /tmp/pip-pip-egg-info-vsc_2hlv/psycopg2_binary.egg-info
writing /tmp/pip-pip-egg-info-vsc_2hlv/psycopg2_binary.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-vsc_2hlv/psycopg2_binary.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-vsc_2hlv/psycopg2_binary.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-vsc_2hlv/psycopg2_binary.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
No, you are not wrong; I had the same issue today, and after a bit of googling I found this (solved) github issue: https://github.com/psycopg/psycopg2/issues/699#
The comments there (https://github.com/psycopg/psycopg2/issues/699#issuecomment-377188700) indicate one possible cause for the issue is using an outdated version of pip.
I was using version 18.x, and after upgrading it (python -m pip install -U pip, which got me pip 21.1.3), the installation of psycopg2-binary finished successfully (as expected) even though I don't have any postgres dev libraries installed.

installing openbabel3 with pip

I tried pip install openbabel --log log_file and I got the following error:
Collecting openbabel
Using cached openbabel-2.4.1.tar.gz (74 kB)
Building wheels for collected packages: openbabel
Building wheel for openbabel (setup.py) ... error
ERROR: Failed building wheel for openbabel
Running setup.py clean for openbabel
Failed to build openbabel
Installing collected packages: openbabel
Running setup.py install for openbabel ... error
ERROR: Command errored out with exit status 1: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/59/zn1rl7b13tqc7t2njskzp6th0000gn/T/pip-install-d2aqd_xf/openbabel/setup.py'"'"'; __file__='"'"'/private/var/folders/59/zn1rl7b13tqc7t2njskzp6th0000gn/T/pip-install-d2aqd_xf/openbabel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/59/zn1rl7b13tqc7t2njskzp6th0000gn/T/pip-record-i_0qytcj/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/openbabel Check the logs for full command output.
Here pip is an alias for pip3.
The log file is here (I am not sure if you can read it, this is my first time sharing a file)
note: A few days ago I opened a second user on my computer, I don't know how it affects things but maybe that's the reason.
I am using Mac OS Catalina.
From a quick look at the log file it looks like it wont install as it cant find a version for Mac OS, only for Windows, however the following may be useful as a workaround to that: How to Install openbabel for Python 3.6 on macOS Sierra 10.12.3
So I found a much simpler way than building openbabel manually. brew install openbabel works for openbabel3
Check the link: http://openbabel.org/wiki/Category:Installation

Issues Installing pdftotext on MacOS using Anaconda

I am newer to programming and am having trouble installing pdftotext in Anaconda, using Mac OS Mojave 10.14.6 and Python 3.6.7. I have installed all the dependencies recommended (https://github.com/jalan/pdftotext) but have not been able to successfully install pdftotext.
Errors include:
ERROR: Command errored out with exit status 1:
command: /anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/3_/T/pip-install-ak3q4wz7/pdftotext/setup.py'"'"'; __file__='"'"'/private/var/folders/3_/T/pip-install-ak3q4wz7/pdftotext/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/3_/T/pip-install-ak3q4wz7/pdftotext/pip-egg-info
cwd: /private/var/folders/3_//T/pip-install-ak3q4wz7/pdftotext/
Complete output (3 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'setuptools'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I ended up using pdftotext from poppler instead of the package listed above. This required the installation of poppler using conda-forge in Anaconda.
For Mac:
conda create -n envname python=3.7
conda activate envname
conda config --add channels conda-forge
conda install poppler
ModuleNotFoundError: No module named 'setuptools'
This suggests that you want to install at least one more dependency:
$ conda install setuptools
Or pip install, if you prefer.

Resources