Failed to install airflow with pip - python

pip command:
pip install google-cloud-storage apache-beam[gcp]==2.2.0 apache-airflow[gcp_api]==1.9.0 paramiko sshtunnel
Error:
ERROR: Command errored out with exit status 1:
command: /home/cyao/Project/itcorp-airflow/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8hamva8l/apache-airflow/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8hamva8l/apache-airflow/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-install-8hamva8l/apache-airflow/pip-egg-info
cwd: /tmp/pip-install-8hamva8l/apache-airflow/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-8hamva8l/apache-airflow/setup.py", line 102
async = [
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

This is the code from apache-airflow setup.py from version 1.9.0. In Python 3.7 the word async became a reserved keyword so the code is incompatible with Python 3.7+.
Either use Python 3.6 or use later version of apache-airflow.

Related

Keep returning error when trying to install MySQL-python on mac

I've tried sudo pip install MySQL-python
I have python 3 and python 2 on my Mac 10.14
and I keep getting this error:
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-00klz8kk/mysql-python/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-00klz8kk/mysql-python/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-98ox2mo0
cwd: /private/tmp/pip-install-00klz8kk/mysql-python/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-install-00klz8kk/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/private/tmp/pip-install-00klz8kk/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
try installing the following which are the same,
pip install pymysql
pip install mysql-connector
pip intsall mysql-connector-python

I am facing "from setuptools import find_namespace_packages" error in python-2.7 while trying to install dm-sonnet package. Any possible solution?

I need to use python-2.7 for some script, setuptools==39.1.0, I cannot pip install dm-sonnet, is there supposed to be find_namespace_packages inside setuptools? Its not there in this setuptools(or v44)
Error message:
ERROR: Command errored out with exit status 1:
command: /home/russo/anaconda3/envs/russo2/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9l072x/dm-sonnet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9l072x/dm-sonnet/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-install-9l072x/dm-sonnet/pip-egg-info
cwd: /tmp/pip-install-9l072x/dm-sonnet/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-9l072x/dm-sonnet/setup.py", line 7, in <module>
from setuptools import find_namespace_packages
ImportError: cannot import name find_namespace_packages
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
dm-sonnet requires Python 3. You cannot use it with Python 2.
In the commit 00612ca setup.py uses find_packages. You can try this version with Python 2.7. It's perhaps release 1.36 or earlier. Try
pip2 install dm-sonnet==1.36
or
pip2 install 'dm-sonnet<2'

Intalling python-midi package in Anaconda

I'm trying to install the following Python-Midi Package (GitHub link) inside an Anaconda envirorment using pip (it works fine, i've already used it for many packages) with the command pip install python-midi.
Unfortunately i keep getting the following error:
ERROR: Command errored out with exit status 1: command: 'C:\Users\Mattia\anaconda3\envs\trapgenerator\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Mattia\\AppData\\Local\\Temp\\pip-install-3jtz232d\\python-midi\\setup.py'"'"'; __file__='"'"'C:\\Users\\Mattia\\AppData\\Local\\Temp\\pip-install-3jtz232d\\python-midi\\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\Mattia\AppData\Local\Temp\pip-install-3jtz232d\python-midi\pip-egg-info' cwd: C:\Users\Mattia\AppData\Local\Temp\pip-install-3jtz232d\python-midi\ Complete output (6 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\Mattia\AppData\Local\Temp\pip-install-3jtz232d\python-midi\setup.py", line 42 print "No sequencer available for '%s' platform." % platform ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("No sequencer available for '%s' platform." % platform)? ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
And i can't really figure out what is the problem. Anyone has any suggestions?
Unfortunately the mentioned python package is not compatible with Python 3, works only with Python 2

Can't install pythonnet on ubuntu 16.04

I'm trying to install pythonnet on my ubuntu, but without success.
I tried some ways as:
pip install pythonnet
2.pip install git+https://github.com/pythonnet/pythonnet
there is any other way?
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ECL8qX/pythonnet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ECL8qX/pythonnet/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-install-ECL8qX/pythonnet/pip-egg-info
cwd: /tmp/pip-install-ECL8qX/pythonnet/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ECL8qX/pythonnet/setup.py", line 18, in <module>
from wheel import bdist_wheel
ImportError: No module named wheel
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Problems with pip or pip3 install requirements.txt what I should to do to fix this error?

I run into the error below when running either command lines;
# Using pip
pip install requirements.txt
# Using pip3
pip3 install requirements.txt
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-evkbiocv/poster/setup.py'"'"'; file='"'"'/tmp/pip-install-evkbiocv/poster/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-install-evkbiocv/poster/pip-egg-info
cwd: /tmp/pip-install-evkbiocv/poster/
Complete output (10 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-evkbiocv/poster/setup.py", line 2, in
import poster
File "/tmp/pip-install-evkbiocv/poster/poster/init.py", line 29, in
import poster.streaminghttp
File "/tmp/pip-install-evkbiocv/poster/poster/streaminghttp.py", line 61
print "send:", repr(value)
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.`
What am I doing wrong and how can I fix it?
poster — the latest version was released in 2011. Obviously the package is for Python 2 and abandoned.
For HTTP use requests.

Categories