datahq / dataflows

DataFlows is a simple, intuitive lightweight framework for building data processing flows in python.
https://dataflows.org
MIT License
194 stars 39 forks source link

python: not found error #121

Closed aborruso closed 4 years ago

aborruso commented 4 years ago

Hi, I have installed it via python3 -m pip install --upgrade --user dataflows.

Then when I run

dataflows init https://raw.githubusercontent.com/datahq/dataflows/master/data/academy.csv

I have

Writing processing code into academy_csv.py
Running academy_csv.py
Processing failed, here's the error:
/bin/sh: 1: python: not found

It's some env problem, but I'm not able to solve it. I use a lot of python cli tools and modules, without any problem.

Thank you

abhi1421 commented 4 years ago

I'm guessing there's a line at the top of your Python script that reads#! /bin/sh python? That line is commonly called a shebang and is used to tell the shell where the correct binary to execute the script can be found. This is required if you want to be able to run the script at the command line without needing to type to the name of the binary first. For example,

$ myscript.py

Instead of

$ python myscript.py

Or in your case

$ python3 myscript.py

As you're using Python 3 and not 2 (which is invoked when you type $ python.

It seems that Python is not found in the directory mentioned above. You'll want to update that line to point to the correct location of the Python 3 binary on your system. You can locate it with the following:

$which python3

akariv commented 4 years ago

Thanks for reporting @aborruso !

This is now fixed in version 0.0.66

aborruso commented 4 years ago

@akariv it works, thank you