I am tying to install the library pyttsx3 by running pip install pyttsx3 But it gives my this output:
Downloading/unpacking pyttsx3
Downloading pyttsx3-2.7.tar.gz
Running setup.py (path:/private/var/folders/km/sv51fl4d30g668xtstm8_lzh0000gq/T/pip_build_username/pyttsx3/setup.py) egg_info for package pyttsx3
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'summary'
warnings.warn(msg)
/private/var/folders/km/sv51fl4d30g668xtstm8_lzh0000gq/T/pip_build_username/pyttsx3/setup.py:12: PkgResourcesDeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.
The above copyright notice and this permission notice shall be included in all
Downloading/unpacking pyobjc>=2.4 (from pyttsx3)
Downloading pyobjc-7.0.1.tar.gz
Running setup.py (path:/private/var/folders/km/sv51fl4d30g668xtstm8_lzh0000gq/T/pip_build_username/pyobjc/setup.py) egg_info for package pyobjc
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/private/var/folders/km/sv51fl4d30g668xtstm8_lzh0000gq/T/pip_build_username/pyobjc/setup.py", line 536
print(f"Framework {fwk} not in framework-wrappers.rst")
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/private/var/folders/km/sv51fl4d30g668xtstm8_lzh0000gq/T/pip_build_username/pyobjc/setup.py", line 536
print(f"Framework {fwk} not in framework-wrappers.rst")
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/var/folders/km/sv51fl4d30g668xtstm8_lzh0000gq/T/pip_build_username/pyobjc
Storing debug log for failure in /var/folders/km/sv51fl4d30g668xtstm8_lzh0000gq/T/tmp7QzgEE
What should I do?
BTW I am using Visual Studio Code. a--------------------------------------------------
Stackoverflow doesn't give me the access to post this question because it is mostly code so I am writing this. Please do not care.
I found my problem,
The library that I wanted to download wasn't compatible with python2.7. When I passed into 3.9, it worked.
Related
I am getting an error while trying pip install DAG packcage.
Error
Collecting DAG
Using cached https://files.pythonhosted.org/packages/e1/92/ffc722ac557e3c180f8ec6cdad96d2731b981677529c263c3df04a656910/DAG-0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\ASHOK~1.EAP\AppData\Local\Temp\pip-install-4dybsujd\DAG\setup.py", line 1, in <module>
from ez_setup import use_setuptools
File "C:\Users\ASHOK~1.EAP\AppData\Local\Temp\pip-install-4dybsujd\DAG\ez_setup.py", line 94
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\ASHOK~1.EAP\AppData\Local\Temp\pip-install-4dybsujd\DAG\
How to fix this.
Try pip install py-dag, this will use https://github.com/thieman/py-dag
DAG, released in 2007. The code is Python2-only.
Try installing the module with Python 2.7. Or find a different, Python3-compatible module.
I've tried to install robotframework-selenium2library but taken a pkg_resources.VersionConflict error:
Downloading/unpacking robotframework-selenium2library
Downloading robotframework-selenium2library-1.8.0.tar.gz (118kB): 118kB downloaded
Running setup.py (path:/tmp/pip_build_root/robotframework-selenium2library/setup.py) egg_info for package robotframework-selenium2library
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/robotframework-selenium2library/setup.py", line 7, in <module>
from ez_setup import use_setuptools
File "/tmp/pip_build_root/robotframework-selenium2library/src/ez_setup.py", line 106
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/robotframework-selenium2library/setup.py", line 7, in <module>
from ez_setup import use_setuptools
File "/tmp/pip_build_root/robotframework-selenium2library/src/ez_setup.py", line 106
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/robotframework-selenium2library
Storing debug log for failure in /root/.pip/pip.log
Not so many packages have been already installed:
pip list
> apparmor (2.9.4)
> LibAppArmor (2.9.4)
> pip (1.5.6)
> pygobject (3.14.0)
> robotframework (3.0.2)
> robotframework-databaselibrary (1.0.1)
> selenium (3.4.3)
> setuptools (3.6)
python --version
> Python 2.7.12
Does anybody know how to resolve that issue?
The version of robotframework-selenium2library at PyPI (1.8.0) is rather old and supports only Python 2 while you're trying to install it with Python 3. Either use Python 2.7 or get the new code for the framework from GitHub.
I review the github Seleniumlibrary, and you can use:
pip install --pre --upgrade robotframework-seleniumlibrary
I've created a Django project and its works as well now I'm trying to config it with MySql so searched in Google and did some ways but when I pip install MySQL-python the below problem occurs:
Collecting MySQL-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-lwubgejh/MySQL-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip-build-lwubgejh/MySQL-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lwubgejh/MySQL-python/
couldn't find any solution for this error:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lwubgejh/MySQL-python/
thank you for help.
This library is not compatible with Python 3. Follow the advice in the Django docs and install mysqlclient instead.
I am trying to install python module Flask-Spyne on Windows and when I type pip install Flask-Spyne, on Sec-Wall collecting TypeError appear.
I am using Python 3.5.1 on Windows 10
This is it:
C:\Windows\system32>pip install flask-spyne
Collecting flask-spyne
Using cached Flask-Spyne-0.2.tar.gz
Collecting flask (from flask-spyne)
Using cached Flask-0.11.1-py2.py3-none-any.whl
Collecting spyne (from flask-spyne)
Using cached spyne-2.12.11.tar.gz
Collecting sec-wall (from flask-spyne)
Using cached sec-wall-1.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\SIVK~1\AppData\Local\Temp\pip-build-mydzld6p\sec-wall\setup.py", line 30, in <module>
packages = find_packages(b"src"),
File "c:\program files (x86)\python35-32\lib\site-packages\setuptools\__init__.py", line 51, in find
out = cls._find_packages_iter(convert_path(where))
File "c:\program files (x86)\python35-32\lib\distutils\util.py", line 129, in convert_path
paths = pathname.split('/')
TypeError: a bytes-like object is required, not 'str'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\SIVK~1\AppData\Local\Temp\pip-build-mydzld6p\sec-wall\
I tried solve python setup.py egg_info error, nothing.
I tried to look at that TypeError, nothing.
Does someone know how to solve it? For any advice I am happy :)
PS: If it help, that when I type pip install suds, this appear:
C:\Windows\system32>pip install suds
Collecting suds
Using cached suds-0.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\SIVK~1\AppData\Local\Temp\pip-build-l7jpgeg4\suds\setup.py", line 20, in <module>
import suds
File "C:\Users\SIVK~1\AppData\Local\Temp\pip-build-l7jpgeg4\suds\suds\__init__.py", line 154, in <module>
import client
ImportError: No module named 'client'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\SIVK~1\AppData\Local\Temp\pip-build-l7jpgeg4\suds\
According to Spyne's documentation, it's known to work with Python versions 2.6. and 2.7, but Python 3 support is not tested.
Also, the error you've got TypeError: a bytes-like object is required, not 'str' is what people often experience when migrating their code from python 2.7 to python 3.
I can reproduce your error when installing the package for python 3.5. And I got no errors when installing it for Python 2.7.
So, maybe you have to switch to Python 2.7, and/or report the problem to the package's developer.
Does cql has support python3?
I tried to install with pip but it failed.
rabit#localhost:/usr/bin> pip-3.3 install cql
^CDownloading/unpacking cql
Operation cancelled by user
Storing complete log in /home/rabit/.pip/pip.log
rabit#localhost:/usr/bin> sudo pip-3.3 install cql
root's password:
Downloading/unpacking cql
Downloading cql-1.4.0.tar.gz (76kB): 76kB downloaded
Running setup.py egg_info for package cql
Downloading/unpacking thrift (from cql)
Running setup.py egg_info for package thrift
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build/thrift/setup.py", line 45
except DistutilsPlatformError, x:
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip-build/thrift/setup.py", line 45
except DistutilsPlatformError, x:
^
SyntaxError: invalid syntax
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/thrift
In fact cql is dependent on Thrift which probably not support python3
Any solution??
Thrift does indeed explicitly not support Python 3, it's metadata is marked as supporting Python 2 only, and installing it gives you a Syntax error.
The solution is to contact the authors of Thrift and help them port to Python 3. and once that is done, help port cql. Updating is usually easy (except in some special cases) and fun!
No, the cql library is not compatible with Python 3. It relies on thrift, a package that is not Python 3 compatible itself:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/Users/mj/Development/venvs/stackoverflow-3.3/build/thrift/setup.py", line 45
except DistutilsPlatformError, x:
^
SyntaxError: invalid syntax
cql itself uses the same obsolete syntax in cqltypes.py:
except (ValueError, AssertionError, IndexError), e:
Both thrift and cql need to be ported first.
For Python 3, you can use CQLEngine.