This question already has an answer here:
Installing the pypiwin32 module
(1 answer)
Closed 10 months ago.
I have tried installing win32com on python version 3.8.8 using several methods finally settling on
!python -m pip install pypiwin32
However I am getting this error.
Collecting pypiwin32
Downloading pypiwin32-223-py3-none-any.whl (1.7 kB)
Downloading pypiwin32-219.zip (4.8 MB)
|████████████████████████████████| 4.8 MB 3.2 MB/s eta 0:00:01
ERROR: Command errored out with exit status 1:
command: /opt/conda/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rxlumrt5/pypiwin32_d674fe4e172b4a5ab12b6b8f2aeb2d90/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rxlumrt5/pypiwin32_d674fe4e172b4a5ab12b6b8f2aeb2d90/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-eb1keprl
cwd: /tmp/pip-install-rxlumrt5/pypiwin32_d674fe4e172b4a5ab12b6b8f2aeb2d90/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-rxlumrt5/pypiwin32_d674fe4e172b4a5ab12b6b8f2aeb2d90/setup.py", line 121
print "Building pywin32", pywin32_version
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Building pywin32", pywin32_version)?
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/2b/ca/5c086c18de8f70222787b3e824e755b68d99272531522e77bb381d4f60c8/pypiwin32-219.zip#sha256=06d478295c89dbdd4187e1ac099bb8eab93c29e298bded4e2fbc77009287fa44 (from https://pypi.org/simple/pypiwin32/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pywin32>=223 (from pypiwin32)
ERROR: No matching distribution found for pywin32>=223
Requesting assistance.
Thanks and Regards,
Yadhunandan
Last time I used win32com I installed the package pywin32, not pypiwin32. I am not sure how well pypiwin32 is maintained, as there is no project description on pypi and it only has 3 Releases, the last being in 2018 (https://pypi.org/project/pypiwin32/).
So maybe try this one:
https://pypi.org/project/pywin32/
Related
By usin pip install simpleaudio I get the following:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting simpleaudio
Using cached simpleaudio-1.0.4.tar.gz (2.0 MB)
ERROR: Command errored out with exit status 1:
command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/lc/wc3y14_d4vvbg6jf40sjnd140000gn/T/pip-install-FVBfFS/simpleaudio/setup.py'"'"'; file='"'"'/private/var/folders/lc/wc3y14_d4vvbg6jf40sjnd140000gn/T/pip-install-FVBfFS/simpleaudio/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/lc/wc3y14_d4vvbg6jf40sjnd140000gn/T/pip-pip-egg-info-UA1xfJ
cwd: /private/var/folders/lc/wc3y14_d4vvbg6jf40sjnd140000gn/T/pip-install-FVBfFS/simpleaudio/
Complete output (5 lines):
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/lc/wc3y14_d4vvbg6jf40sjnd140000gn/T/pip-install-FVBfFS/simpleaudio/setup.py", line 42, in
encoding='utf-8') as f:
TypeError: 'encoding' is an invalid keyword argument for this function
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Though, I am a Python programmer with little experience. It sounds like your are still using Python 2.7 which has been deprecated(not longer supported). To solve this, I recommend you go to python.org and then hover over the downloads button and then download the current version of Python.
This question already has answers here:
Error while downloading the requirements using pip install (setup command: use_2to3 is invalid.)
(6 answers)
Closed 1 year ago.
I am trying to install ibm_db_sa in my miniconda virtual environment (python 3.6). I am seeing this error and it could be because I am a separate user on my laptop and not the admin. Is there any solution/workaround this?
sudo pip install ibm_db_sa
Password:
WARNING: The directory '/Users/myname/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting ibm_db_sa
Downloading ibm_db_sa-0.3.7.tar.gz (30 kB)
Requirement already satisfied: sqlalchemy>=0.7.3 in /usr/local/Caskroom/miniconda/base/envs/finalenv/lib/python3.6/site-packages (from ibm_db_sa) (1.4.25)
Collecting ibm_db>=2.0.0
Downloading ibm_db-3.0.4.tar.gz (796 kB)
|████████████████████████████████| 796 kB 1.1 MB/s
ERROR: Command errored out with exit status 1:
command: /usr/local/Caskroom/miniconda/base/envs/finalenv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-2fdrlxey/ibm-db_375dbdf21455451c871e608261014786/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-2fdrlxey/ibm-db_375dbdf21455451c871e608261014786/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/tmp/pip-pip-egg-info-jzevidp0
cwd: /private/tmp/pip-install-2fdrlxey/ibm-db_375dbdf21455451c871e608261014786/
Complete output (3 lines):
Detected 64-bit Python
Downloading https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz
error in ibm_db setup command: use_2to3 is invalid.
WARNING: Discarding https://files.pythonhosted.org/packages/b6/0c/a8d57078772abcc876f6a2be2252f12284aa6f71f41d3c2910f23369d7d2/ibm_db-2.0.6.1.tar.gz#sha256=bdc6543702e19d8ff7a0ddef715a9ee32a7753686cbcfe99095c2e357efe4135 (from https://pypi.org/simple/ibm-db/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Downloading ibm_db-2.0.5.1.tar.gz (460 kB)
|████████████████████████████████| 460 kB 1.1 MB/s
ERROR: No .egg-info directory found in /private/tmp/pip-pip-egg-info-y8tp952r
The issue you ran into seems related to a problem with setuptools. See this issue in the GitHub repository for the ibm_db driver.
Alright so what I've been trying to do the past hour is install the pywintypes lib and searched up that it was pypiwin32 instead but it doesn't work it fails to build additionally tried installing it manually by downloading the source and running setup.py but got same err: I get this error and I have python 3.10
Collecting pypiwin32
Using cached pypiwin32-223-py3-none-any.whl (1.7 kB)
Using cached pypiwin32-219.zip (4.8 MB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Rasmus\AppData\Local\Programs\Python\Python310\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Rasmus\\AppData\\Local\\Temp\\pip-install-3z4zmi2y\\pypiwin32_ec886c51d7334f269d55dee9cd57e04b\\setup.py'"'"'; __file__='"'"'C:\\Users\\Rasmus\\AppData\\Local\\Temp\\pip-install-3z4zmi2y\\pypiwin32_ec886c51d7334f269d55dee9cd57e04b\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Rasmus\AppData\Local\Temp\pip-pip-egg-info-6dg0frr7'
cwd: C:\Users\Rasmus\AppData\Local\Temp\pip-install-3z4zmi2y\pypiwin32_ec886c51d7334f269d55dee9cd57e04b\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Rasmus\AppData\Local\Temp\pip-install-3z4zmi2y\pypiwin32_ec886c51d7334f269d55dee9cd57e04b\setup.py", line 121
print "Building pywin32", pywin32_version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/2b/ca/5c086c18de8f70222787b3e824e755b68d99272531522e77bb381d4f60c8/pypiwin32-219.zip#sha256=06d478295c89dbdd4187e1ac099bb8eab93c29e298bded4e2fbc77009287fa44 (from https://pypi.org/simple/pypiwin32/). Command errored out with exit status 1:
python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pywin32>=223 (from pypiwin32) (from versions: none)
ERROR: No matching distribution found for pywin32>=223
the only solution I can see is to downgrade from python 3.10 down to 3.9
pywin32 version 302 (NOT pypiwin32, which looks like a mistake from 2018) was uploaded to PyPi on October 10, 2021, and states in the change log:
Support for Python 10, dropped support for Python 3.5 (3.5 security support
ended 13 Sep 2020)
Demo (using PyLauncher to update my 3.10 install):
C:\>py -3.10 -m pip install pywin32
Collecting pywin32
Downloading pywin32-302-cp310-cp310-win_amd64.whl (9.2 MB)
|████████████████████████████████| 9.2 MB 6.8 MB/s
Installing collected packages: pywin32
Successfully installed pywin32-302
Make sure to run the Scripts\pywin32_postinstall.py from an administrator command prompt as well to register it properly. Make sure it runs in the context of the 3.10 installation as well (again using PyLauncher):
C:\Python310\Scripts>py -3.10 pywin32_postinstall.py -install
Parsed arguments are: Namespace(install=True, remove=False, wait=None, silent=False, quiet=False, destination='C:\\Python310\\Lib\\site-packages')
Copied pythoncom310.dll to C:\windows\system32\pythoncom310.dll
Copied pywintypes310.dll to C:\windows\system32\pywintypes310.dll
Registered: Python.Interpreter
Registered: Python.Dictionary
Registered: Python
-> Software\Python\PythonCore\3.10\Help[None]=None
-> Software\Python\PythonCore\3.10\Help\Pythonwin Reference[None]='C:\\Python310\\Lib\\site-packages\\PyWin32.chm'
Registered help file
Pythonwin has been registered in context menu
Shortcut for Pythonwin created
Shortcut to documentation created
The pywin32 extensions were successfully installed.
This question already has answers here:
While installing pyttsx3: Command errored out with exit status 1
(4 answers)
Closed 3 years ago.
C:\Windows\system32>pip install pyttsx3
Collecting pyttsx3
Using cached pyttsx3-2.80-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-AppleScriptObjC==6.1; platform_release >= "10.0"
Downloading pyobjc_framework_AppleScriptObjC-6.1-py2.py3-none-any.whl (3.9 kB)
Collecting pyobjc-framework-CoreWLAN==6.1; platform_release >= "10.0"
Using cached pyobjc-framework-CoreWLAN-6.1.tar.gz (45 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-zecnttcs\\pyobjc-framework-CoreWLAN\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-zecnttcs\\pyobjc-framework-CoreWLAN\\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\User\AppData\Local\Temp\pip-install-zecnttcs\pyobjc-framework-CoreWLAN\pip-egg-info'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-zecnttcs\pyobjc-framework-CoreWLAN\
Complete output (15 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\User\AppData\Local\Temp\pip-install-zecnttcs\pyobjc-framework-CoreWLAN\setup.py", line 27, in <module>
for fn in os.listdir("Modules")
File "C:\Users\User\AppData\Local\Temp\pip-install-zecnttcs\pyobjc-framework-CoreWLAN\pyobjc_setup.py", line 408, in Extension
os_level = get_os_level()
File "C:\Users\User\AppData\Local\Temp\pip-install-zecnttcs\pyobjc-framework-CoreWLAN\pyobjc_setup.py", line 218, in get_os_level
pl = plistlib.readPlist("/System/Library/CoreServices/SystemVersion.plist")
File "c:\users\user\appdata\local\programs\python\python37-32\lib\plistlib.py", line 99, in readPlist
with _maybe_open(pathOrFile, 'rb') as fp:
File "c:\users\user\appdata\local\programs\python\python37-32\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "c:\users\user\appdata\local\programs\python\python37-32\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'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Whenever i try to run pip install pyttsx3 the previous error is shown. I am fully updated with Setuptools and have followed multiple trouble shooting steps. My last step is to post here.
You are using python-3x version there for use this
pip3 install pyttsx3
If you use conda environment install this using anaconda prompt.
conda install -c auto pyttsx
Here is an image about my problem.I'm totally stuck.
https://ibb.co/hCx74JV
C:\Users\Staj>pip install imgaug
Collecting imgaug
Using cached https://files.pythonhosted.org/packages/17/a9/36de8c0e1ffb2d86f871cac60e5caa910cbbdb5f4741df5ef856c47f4445/imgaug-0.2.9-py2.py3-none-any.whl
Requirement already satisfied: Pillow in e:\python\lib\site-packages (from imgaug) (5.4.1)
Collecting scikit-image>=0.11.0 (from imgaug)
Using cached https://files.pythonhosted.org/packages/79/16/c5a36a03f90d4a246791d4ff1879f1868e1c5db58fac9f03427395c5e2d6/scikit_image-0.15.0-cp37-none-win_amd64.whl
Requirement already satisfied: six in e:\python\lib\site-packages (from imgaug) (1.12.0)
Collecting Shapely (from imgaug)
Using cached https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz
ERROR: Command errored out with exit status 1:
command: 'e:\python\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Staj\\AppData\\Local\\Temp\\pip-install-_wc8sxch\\Shapely\\setup.py'"'"'; __file__='"'"'C:\\Users\\Staj\\AppData\\Local\\Temp\\pip-install-_wc8sxch\\Shapely\\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\Staj\AppData\Local\Temp\pip-install-_wc8sxch\Shapely\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Staj\AppData\Local\Temp\pip-install-_wc8sxch\Shapely\setup.py", line 80, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\Users\Staj\AppData\Local\Temp\pip-install-_wc8sxch\Shapely\shapely\_buildcfg.py", line 200, in <module>
lgeos = CDLL("geos_c.dll")
File "e:\python\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The error is probably due to missing C compiler required for building the dll.
Workaround:
install binaries from https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely
pip install Shapely-1.6.4.post2-cp37-cp37m-win_amd64.whl (In Anaconda env. you can use conda install)
Error rather says it all. The specified module could not be found means that you didn't install some required packages. I guess you're missing Shapely which is a requirement. Follow installation steps from the documentation next time. Or use conda, it's simpler.