Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation broken on linux/windows #143

Closed
russlevy opened this issue Mar 27, 2018 · 11 comments
Closed

Installation broken on linux/windows #143

russlevy opened this issue Mar 27, 2018 · 11 comments

Comments

@russlevy
Copy link

russlevy commented Mar 27, 2018

Starting with version 0.13, running pip install keyboard doesn't seem to work.

Collecting keyboard
  Downloading keyboard-0.13.0-py2.py3-none-any.whl (54kB)
    100% |████████████████████████████████| 61kB 4.5MB/s
Collecting pyobjc (from keyboard)
  Downloading pyobjc-4.1-py2-none-any.whl
Collecting pyobjc-framework-CFNetwork==4.1 (from pyobjc->keyboard)
  Downloading pyobjc-framework-CFNetwork-4.1.tar.gz (69kB)
    100% |████████████████████████████████| 71kB 4.6MB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-SKani6/pyobjc-framework-CFNetwork/setup.py", line 26, in <module>
        extra_link_args=['-framework', 'CoreServices'],
      File "pyobjc_setup.py", line 386, in Extension
        os_level = get_os_level()
      File "pyobjc_setup.py", line 200, in get_os_level
        pl = plistlib.readPlist('/System/Library/CoreServices/SystemVersion.plist')
      File "/usr/lib/python2.7/plistlib.py", line 75, in readPlist
        pathOrFile = open(pathOrFile)
    IOError: [Errno 2] No such file or directory: '/System/Library/CoreServices/SystemVersion.plist'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-SKani6/pyobjc-framework-CFNetwork/
@alxchk
Copy link

alxchk commented Mar 27, 2018

pip install --upgrade --user git+https://github.com/boppreh/keyboard -- works

From pip - same story

@boppreh
Copy link
Owner

boppreh commented Mar 27, 2018

I think this is due to the new pyobjc declaration format. Instead if reading the platform name in runtime, we are using a setuptools format to declare a dependency is MacOS only.

I'll revert back to the old format and publish a fix as soon as I can.

@boppreh
Copy link
Owner

boppreh commented Mar 27, 2018

setup.py fixed in version 0.,13.1. Please use pip install --no-cache keyboard if your pip cached the version with incorrect dependency.

Thank you for the timely bug report, it would have taken me a while to realize the problem since I always work locally.

boppreh added a commit that referenced this issue Mar 29, 2018
This is related to issues #136 and #143. By declaring the dependency
using "sys_platform" instead of an `if` in setup.py, the egg is built
correctly regardless of the platform used for building the release.

However clients complained of broken installations on Windows and Linux
(#143). To avoid breakage, the `if` was reinstituted.

The problem was that the platform used to build the release has to have
an up-to-date setuptools installed, since this is a somewhat new
feature. Otherwise the dependency is copied verbatim, "; sys_platform==..."
string included. Confusingly, clients facing this garbled dependency
declaration still try to install the package, resulting in errors that
look like the "sys_platform" part was ignored entirely.

This commit reverts back to using "sys_platform", and this developer
promises to be extra careful not to build releases on systems with
outdated setuptools.
@sushrut29
Copy link

I am getting this error while installing "pyttsx3" which is saying something like pyobjc . Please help me
FileNotFoundError: [Errno 2] No such file or directory: '/System/Library/CoreServices/SystemVersion.plist'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@danish2694
Copy link

Were you able to resolve it @sushrut29?
As I am also getting the same error.

@khushbu-mulani
Copy link

khushbu-mulani commented Mar 17, 2020

@sushrut29 @danish2694 you can install "pyttsx3" using

pip install git+https://github.com/nateshmbhat/pyttsx3

@sushrut29
Copy link

sushrut29 commented Mar 17, 2020

I have solved the problem. Uninstalled Python 3.7 , installed Python 3.6 and then pip install pyttsx3 worked superbly ! @danish2694

@Pmad9
Copy link

Pmad9 commented Mar 22, 2020

@sushrut29 @danish2694 you can install "pyttsx3" using

pip install git+https://github.com/nateshmbhat/pyttsx3

PS C:\Users\puneetm\Desktop\PB\MIS\vs files> pip install pyttsx3
Collecting pyttsx3
Using cached pyttsx3-2.84-py3-none-any.whl (39 kB)
Collecting pyobjc>=2.4
Using cached pyobjc-6.1-py3-none-any.whl (2.9 kB)
Collecting comtypes; "win32" in sys_platform
Using cached comtypes-1.1.7.zip (180 kB)
Collecting pyobjc-framework-SearchKit==6.1
Downloading pyobjc_framework_SearchKit-6.1-py2.py3-none-any.whl (3.3 kB)
Collecting pyobjc-framework-CoreAudio==6.1
Downloading pyobjc-framework-CoreAudio-6.1.tar.gz (82 kB)
|████████████████████████████████| 82 kB 33 kB/s
ERROR: Command errored out with exit status 1:
command: 'C:\Users\puneetm\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\puneetm\AppData\Local\Temp\pip-install-r4abkijd\pyobjc-framework-CoreAudio\setup.py'"'"'; file='"'"'C:\Users\puneetm\AppData\Local\Temp\pip-install-r4abkijd\pyobjc-framework-CoreAudio\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 'C:\Users\puneetm\AppData\Local\Temp\pip-install-r4abkijd\pyobjc-framework-CoreAudio\pip-egg-info'
cwd: C:\Users\puneetm\AppData\Local\Temp\pip-install-r4abkijd\pyobjc-framework-CoreAudio
Complete output (15 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\puneetm\AppData\Local\Temp\pip-install-r4abkijd\pyobjc-framework-CoreAudio\setup.py", line 30, in
extra_link_args=["-framework", "CoreAudio"],
File "C:\Users\puneetm\AppData\Local\Temp\pip-install-r4abkijd\pyobjc-framework-CoreAudio\pyobjc_setup.py", line 408, in Extension
os_level = get_os_level()
File "C:\Users\puneetm\AppData\Local\Temp\pip-install-r4abkijd\pyobjc-framework-CoreAudio\pyobjc_setup.py", line 218, in get_os_level
pl = plistlib.readPlist("/System/Library/CoreServices/SystemVersion.plist")
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2032.0_x64__qbz5n2kfra8p0\lib\plistlib.py", line 99, in readPlist
with _maybe_open(pathOrFile, 'rb') as fp:
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2032.0_x64__qbz5n2kfra8p0\lib\contextlib.py", line 112, in enter
return next(self.gen)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2032.0_x64__qbz5n2kfra8p0\lib\plistlib.py", line 82, in _maybe_open
with open(pathOrFile, mode) as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/System/Library/CoreServices/SystemVersion.plist'

getting this error

@surajmahendra2552
Copy link

C:\Users\Suraj Mahendra\Desktop\mahe>pip install pyttsx3
Collecting pyttsx3
Using cached pyttsx3-2.84-py3-none-any.whl (39 kB)
Collecting comtypes; "win32" in sys_platform
Using cached comtypes-1.1.7.zip (180 kB)
Collecting pyobjc>=2.4
Using cached pyobjc-6.1-py3-none-any.whl (2.9 kB)
Collecting pyobjc-framework-CoreAudioKit==6.1
Downloading pyobjc-framework-CoreAudioKit-6.1.tar.gz (18 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\suraj mahendra\appdata\local\programs\python\python36-32\python.exe' -c 'import sys, setuptools,
tokenize; sys.argv[0] = '"'"'C:\Users\Suraj Mahendra\AppData\Local\Temp\pip-install-v5txapef\pyobjc-framework-CoreAudioKit\setup.py'"'"'; file='"'"'C:\Users\Suraj Mahendra\AppData\Local\Temp\pip-install-v5txapef\pyobjc-framework-CoreAudioKit\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 'C:\Users\Suraj Mahendra\AppData\Local\Temp\pip-install-v5txapef\pyobjc-framework-CoreAudioKit\pip-egg-info'
cwd: C:\Users\Suraj Mahendra\AppData\Local\Temp\pip-install-v5txapef\pyobjc-framework-CoreAudioKit
Complete output (15 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Suraj Mahendra\AppData\Local\Temp\pip-install-v5txapef\pyobjc-framework-CoreAudioKit\setup.py", line 33, in
for fn in os.listdir("Modules")
File "C:\Users\Suraj Mahendra\AppData\Local\Temp\pip-install-v5txapef\pyobjc-framework-CoreAudioKit\pyobjc_setup.py", line 408, in Extension
os_level = get_os_level()
File "C:\Users\Suraj Mahendra\AppData\Local\Temp\pip-install-v5txapef\pyobjc-framework-CoreAudioKit\pyobjc_setup.py", line 218, in get_os_level
pl = plistlib.readPlist("/System/Library/CoreServices/SystemVersion.plist")
File "c:\users\suraj mahendra\appdata\local\programs\python\python36-32\lib\plistlib.py", line 162, in readPlist
with _maybe_open(pathOrFile, 'rb') as fp:
File "c:\users\suraj mahendra\appdata\local\programs\python\python36-32\lib\contextlib.py", line 82, in enter
return next(self.gen)
File "c:\users\suraj mahendra\appdata\local\programs\python\python36-32\lib\plistlib.py", line 120, in _maybe_open
with open(pathOrFile, mode) as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/System/Library/CoreServices/SystemVersion.plist'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@boppreh
Copy link
Owner

boppreh commented Mar 23, 2020

People, this is a closed issue in the keyboard library and is entirely unrelated to the issue you are having. You'll get better answers if you post your question on StackOverflow or somewhere related to pyttsx3.

@danish2694
Copy link

thanks, @khushbu-mulani & @sushrut29, I solved the issue by installing a lower version and it is working fine as of now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants