ShihabHT
ShihabHT

Reputation: 1

Error installing PyObjC library for python windows 10

I was trying to create a personal assistant for fun. I imported playsound module and gTTS module. They were all ok. But the google tts was sounding like old days tts. It did not sound so great like it did in the video I was following. So I thought it might be the problem because of the module 'PyObjC' that i did not install, but the guy did in the video. So I also need to know if it was the reason the tts was sounding different.

So, When I tried to install PyObjC module in pycharm I found following error

I tried to install with this command

pip install pyobjc

At the end it says

ERROR: Could not find a version that satisfies the requirement pyobjc-framework-CoreWLAN
ERROR: No matching distribution found for pyobjc-framework-CoreWLAN

Here is the whole log

Collecting PyObjC
  Downloading pyobjc-7.1-py3-none-any.whl (3.0 kB)
Collecting pyobjc-framework-DiscRecordingUI==7.1
  Downloading pyobjc_framework_DiscRecordingUI-7.1-py2.py3-none-any.whl (4.2 kB)
Collecting pyobjc-framework-ServiceManagement==7.1
  Downloading pyobjc_framework_ServiceManagement-7.1-py2.py3-none-any.whl (4.4 kB)
Collecting pyobjc-framework-AppleScriptKit==7.1
  Downloading pyobjc_framework_AppleScriptKit-7.1-py2.py3-none-any.whl (3.8 kB)
Collecting pyobjc-framework-NetFS==7.1
  Downloading pyobjc_framework_NetFS-7.1-py2.py3-none-any.whl (3.7 kB)
Collecting pyobjc-framework-LaunchServices==7.1
  Downloading pyobjc_framework_LaunchServices-7.1-py2.py3-none-any.whl (3.3 kB)
Collecting pyobjc-framework-CoreAudioKit==7.1
  Downloading pyobjc-framework-CoreAudioKit-7.1.tar.gz (18 kB)
    ERROR: Command errored out with exit status 1:
     command: 'f:\tutorial stuffs\python stuffs\python projects\jarvisai\venv\scripts\python.exe' -c     'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-g
kyklypv\\pyobjc-framework-coreaudiokit_3c513b6869b344269cf01d2f0d88825d\\setup.py'"'"'; __file__='"'"'C:\\Users\\Lenovo\\AppData\\Local\\Temp\\pip-install-gkyklypv\\pyobjc-framework-coreaudiokit_3c513b6869b344
269cf01d2f0d88825d\\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\Lenovo\AppData\Local\Temp\pip-pip-egg-info-cx4g0zlj'
     cwd: C:\Users\Lenovo\AppData\Local\Temp\pip-install-gkyklypv\pyobjc-framework-   coreaudiokit_3c513b6869b344269cf01d2f0d88825d\
Complete output (9 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Lenovo\AppData\Local\Temp\pip-install-gkyklypv\pyobjc-framework-coreaudiokit_3c513b6869b344269cf01d2f0d88825d\setup.py", line 28, in <module>
    Extension(
  File "C:\Users\Lenovo\AppData\Local\Temp\pip-install-gkyklypv\pyobjc-framework-coreaudiokit_3c513b6869b344269cf01d2f0d88825d\pyobjc_setup.py", line 414, in Extension
    os_level = get_os_level()
  File "C:\Users\Lenovo\AppData\Local\Temp\pip-install-gkyklypv\pyobjc-framework-coreaudiokit_3c513b6869b344269cf01d2f0d88825d\pyobjc_setup.py", line 200, in get_os_level
    with open("/System/Library/CoreServices/SystemVersion.plist", "rb") as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/System/Library/CoreServices/SystemVersion.plist'
----------------------------------------
WARNING: Discarding     https://files.pythonhosted.org/packages/49/5f/8fa17896dc615bf693934dd96a4902ac3b2887a12bc8ddd547b8fed733b7/pyobjc-framework-CoreAudioKit-7.1.tar.gz#sha256=64754be56061b879915d840e0c98f4a6e0
c1135d0cfd3737a08fbbfb138403f7 (from https://pypi.org/simple/pyobjc-framework-coreaudiokit/) (requires-python:>=3.6). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Collecting PyObjC
  Downloading pyobjc-7.0.1-py3-none-any.whl (3.1 kB)
Collecting pyobjc-framework-Quartz==7.0.1
  Downloading pyobjc-framework-Quartz-7.0.1.tar.gz (3.3 MB)
 |████████████████████████████████| 3.3 MB 125 kB/s

This way it tries to check all available version, and this what it shows at the end

WARNING: Discarding https://files.pythonhosted.org/packages/ce/dd/0f24ca4105b654465251150d6fdee3e134b92e33d91cbd0455a80e0b99f3/pyobjc-2.2.tar.gz#sha256=b921d5dea8e21279bd5fb5f28bf87f0dbbae252b5fb7ce8e54d0552b2
b3a3168 (from https://pypi.org/simple/pyobjc/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Cannot install pyobjc==4.1, pyobjc==4.2, pyobjc==4.2.1, pyobjc==4.2.2, pyobjc==5.0, pyobjc==5.1, pyobjc==5.1.1, pyobjc==5.1.2, pyobjc==5.2, pyobjc==5.3, pyobjc==6.0, pyobjc==6.0.1, pyobjc==6.1, pyobjc==
6.2, pyobjc==6.2.1, pyobjc==6.2.2, pyobjc==7.0, pyobjc==7.0.1 and pyobjc==7.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    pyobjc 7.1 depends on pyobjc-framework-CoreAudioKit==7.1
    pyobjc 7.0.1 depends on pyobjc-framework-Quartz==7.0.1
    pyobjc 7.0 depends on pyobjc-framework-CoreMIDI==7.0
    pyobjc 6.2.2 depends on pyobjc-framework-CoreData==6.2.2
    pyobjc 6.2.1 depends on pyobjc-core==6.2.1
    pyobjc 6.2 depends on pyobjc-framework-Cocoa==6.2
    pyobjc 6.1 depends on pyobjc-framework-WebKit==6.1
    pyobjc 6.0.1 depends on pyobjc-framework-FSEvents==6.0.1; platform_release >= "9.0"
    pyobjc 6.0 depends on pyobjc-framework-CoreServices==6.0
    pyobjc 5.3 depends on pyobjc-framework-CoreData==5.3
    pyobjc 5.2 depends on pyobjc-framework-CoreText==5.2
    pyobjc 5.1.2 depends on pyobjc-framework-FSEvents==5.1.2; platform_release >= "9.0"
    pyobjc 5.1.1 depends on pyobjc-framework-WebKit==5.1.1
    pyobjc 5.1 depends on pyobjc-framework-ScreenSaver==5.1
    pyobjc 5.0 depends on pyobjc-core==5.0
    pyobjc 4.2.2 depends on pyobjc-framework-CoreText==4.2.2
    pyobjc 4.2.1 depends on pyobjc-framework-SecurityInterface==4.2.1
    pyobjc 4.2 depends on pyobjc-core==4.2
    pyobjc 4.1 depends on pyobjc-framework-Quartz==4.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

Upvotes: 0

Views: 4505

Answers (2)

ShihabHT
ShihabHT

Reputation: 1

The error was solved. pyObjC requires 64bit python setup.exe, But I had 32 bit version of python installed. And this caused the problem. You need to install 64 bit python setup file and that should solve this error....

Upvotes: 0

Ronald Oussoren
Ronald Oussoren

Reputation: 2810

PyObjC is a collection of python packages for macOS and is cannot be installed on Windows (or Linux)

Upvotes: 2

Related Questions