I get an error when I install pyobjc on my mac - python

I have successfully installed pyobjc-core, but when I try to install pyobjc, I get an error:
(the first part)
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/setup.py'"'"'; file='"'"'/private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/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/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-record-2nxnxwsn/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyobjc-framework-Cocoa
cwd: /private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/
(the last part)
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/setup.py'"'"'; file='"'"'/private/var/folders/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-install-nnn7ftk2/pyobjc-framework-cocoa/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/b6/22gqf0jd6252c93x8pbxr5nw0000gn/T/pip-record-2nxnxwsn/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyobjc-framework-Cocoa Check the logs for full command output.

Try to use different Python version, right now not all libraries have wheels for 3.9 .

Related

could not install tigramite package

I get the following error when trying to install the tigramite package:
ERROR: Command errored out with exit status 1:
command: 'C:\Users\IC3\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\IC3\\AppData\\Local\\Temp\\pip-install-v7nlp1rq\\tigramite_ebe1ab9fa0f04c4ea4e283de07b9517b\\setup.py'"'"'; __file__='"'"'C:\\Users\\IC3\\AppData\\Local\\Temp\\pip-install-v7nlp1rq\\tigramite_ebe1ab9fa0f04c4ea4e283de07b9517b\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\IC3\AppData\Local\Temp\pip-record-q5e2snyq\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\IC3\anaconda3\Include\tigramite'
This is on Windows in an Anaconda Python distribution.
What is causing this and how can I get it to install?

Python2: installing networkx

I'm tryng to install networkx on python 2.7.18:
pip2 install networkx
I get the following error:
Running setup.py install for networkx ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1b/8lq89lxj07bd6rvtl1k6g1b80000gn/T/pip-install-xAglEZ/networkx/setup.py'"'"'; _file='"'"'/private/var/folders/1b/8lq89lxj07bd6rvtl1k6g1b80000gn/T/pip-install-xAglEZ/networkx/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/1b/8lq89lxj07bd6rvtl1k6g1b80000gn/T/pip-record-cJQmE6/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/networkx
cwd: /private/var/folders/1b/8lq89lxj07bd6rvtl1k6g1b80000gn/T/pip-install-xAglEZ/networkx/
and in the end:
error: could not create '/Library/Frameworks/Python.framework/Versions/2.7/share/doc/networkx-2.2': Permission denied
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1b/8lq89lxj07bd6rvtl1k6g1b80000gn/T/pip-install-xAglEZ/networkx/setup.py'"'"'; _file='"'"'/private/var/folders/1b/8lq89lxj07bd6rvtl1k6g1b80000gn/T/pip-install-xAglEZ/networkx/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/1b/8lq89lxj07bd6rvtl1k6g1b80000gn/T/pip-record-cJQmE6/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/networkx Check the logs for full command output.
What should I do?
This means that you don't have sufficient privileges.
You can either run the command with sudo (if you are a root user):
sudo pip2 install networkx
or just install it just for the current user
pip2 install networkx --user
PS: Consider upgrading to pip3.

Python Error Exit Status 1 for Anaconda/Jupyter

I am trying to pip install geopandas and keep getting an exit 1 status error. Then I try to pip install GDAL, but still get the same error. I can pip install other libraries just fine, so don't know where this is coming from. Any ideas?
ERROR: Failed building wheel for gdal
ERROR: Command errored out with exit status 1:
command: 'C:\Users\ Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ \AppData\\Local\\Temp\\pip-install-oe6w8_hs\\gdal_c05dbd958e124d1a91f8d136cee3c342\\setup.py'"'"'; __file__='"'"'C:\\Users\\ \AppData\\Local\\Temp\\pip-install-oe6w8_hs\\gdal_c05dbd958e124d1a91f8d136cee3c342\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ AppData\Local\Temp\pip-record-b95x1co9\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\ Anaconda3\Include\gdal'
cwd: C:\Users\ AppData\Local\Temp\pip-install-oe6w8_hs\gdal_c05dbd958e124d1a91f8d136cee3c342\
ERROR: Command errored out with exit status 1: 'C:\Users\ Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ \AppData\\Local\\Temp\\pip-install-oe6w8_hs\\gdal_c05dbd958e124d1a91f8d136cee3c342\\setup.py'"'"'; __file__='"'"'C:\\Users\\ \AppData\\Local\\Temp\\pip-install-oe6w8_hs\\gdal_c05dbd958e124d1a91f8d136cee3c342\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ AppData\Local\Temp\pip-record-b95x1co9\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\ Anaconda3\Include\gdal' Check the logs for full command output.
Considering you have installed anaconda, I would recommend following instructions from the geopandas project: https://geopandas.org/getting_started/install.html
From my experience, setting up a work environment with conda-forge repositories as a default sets a very convenient context for working with geopandas.

How do i solve this error when installing scikit-image?

I get the below error when using pip install scikit-image. Note I have got Microsoft VS installed.
What is causing this?
not sure if it is an issue with numpy?
Thanks
ERROR: Command errored out with exit status 1:
command: 'c:\users\student\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Student\\AppData\\Local\\Temp\\pip-install-2dp2c1cs\\scikit-image_610bd9ad5a3b4de0a232ce6491f9d39a\\setup.py'"'"'; __file__='"'"'C:\\Users\\Student\\AppData\\Local\\Temp\\pip-install-2dp2c1cs\\scikit-image_610bd9ad5a3b4de0a232ce6491f9d39a\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Student\AppData\Local\Temp\pip-record-r78qb75l\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\student\appdata\local\programs\python\python39\Include\scikit-image'
cwd: C:\Users\Student\AppData\Local\Temp\pip-install-2dp2c1cs\scikit-
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\student\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Student\\AppData\\Local\\Temp\\pip-install-2dp2c1cs\\scikit-image_610bd9ad5a3b4de0a232ce6491f9d39a\\setup.py'"'"'; __file__='"'"'C:\\Users\\Student\\AppData\\Local\\Temp\\pip-install-2dp2c1cs\\scikit-image_610bd9ad5a3b4de0a232ce6491f9d39a\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Student\AppData\Local\Temp\pip-record-r78qb75l\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\student\appdata\local\programs\python\python39\Include\scikit-image' Check the logs for full command output.
According to this issue on GitHub, it is still not available on Python 3.9.
They provide a few solutions:
conda install -c conda-forge scikit-learn with Conda
pip install --pre -U scikit-learn on windows
For python==3.10.4:
Just upgrade your pip command in your CMD as administrator, and everything will work fine.
python -m pip install –-upgrade pip

Can't install Twilio with pip: Running setup.py install for twilio ... error ERROR: Command errored out with exit status 1:

I can't install Twilio using pip install twilio. It gives this error:
Running setup.py install for twilio ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\PC\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-24qqtllg\\twilio\\setup.py'"'"'; __file__='"'"'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-install-24qqtllg\\twilio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\PC\AppData\Local\Temp\pip-record-j29nk9s3\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Include\twilio'
cwd: C:\Users\PC\AppData\Local\Temp\pip-install-24qqtllg\twilio\

Categories