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

ImportError: No module named dataflows #45

Closed kayakr closed 5 years ago

kayakr commented 5 years ago

Fresh install on macOS 10.13.6 High Sierra. I'm new to Python, following the tutorial at http://okfnlabs.org/blog/2018/08/29/data-factory-data-flows-introduction.html

09:08:25 jonathan:~/Documents/projects/datafactory (master) $ dataflows --help

Usage: dataflows [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  init  Bootstrap a processing pipeline script.

09:08:29 jonathan:~/Documents/projects/datafactory (master) $ dataflows init https://rawgit.com/datahq/demo/_/first.csv

Writing processing code into first_csv.py
Running first_csv.py
Processing failed, here's the error:
python: VERSIONER_PYTHON_VERSION environment variable error (ignored)
Traceback (most recent call last):
  File "first_csv.py", line 1, in <module>
    from dataflows import Flow, load, dump_to_path, dump_to_zip, printer, add_metadata
ImportError: No module named dataflows

09:16:13 jonathan:~/Documents/CatalystIT/projects/datafactory (master) $ dataflows init

Hi There!
    DataFlows will now bootstrap a data processing flow based on your needs.

    Press any key to start...

[?] What is the source of your data?: File
 ❯ File
   Remote URL
   SQL Database
   Other

At first I thought maybe the rawgit.com URL is bad (it doesn't serve data now), but dataflows init https://raw.githubusercontent.com/datahq/demo/master/first.csv also generates the ImportError: No module named dataflows message.

akariv commented 5 years ago

This looks like a python installation issue - you have multiple versions of Python which are interfering with one another (the VERSIONER_PYTHON_VERSION environment variable error pretty much gives it away).

I found this SO question that might be relevant: https://stackoverflow.com/questions/15170871/python-path-error

For developing with Python on OSX, I very much recommend using pyenv - https://github.com/pyenv/pyenv. It allows you to use multiple versions of Python on your machine, without interfering in any way with the preinstalled/global versions.

kayakr commented 5 years ago

@akariv Thanks for the response. I just reconstituted my homebrew python3 install and venv via https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-macos and the dataflows tutorial works ok.

BTW, the CSV URL still needs updating to https://raw.githubusercontent.com/datahq/demo/master/first.csv

akariv commented 5 years ago

Great, happy to hear! We'll update the URL in the demo - thank you for that.

On Thu, Oct 25, 2018 at 12:04 AM J Hunt notifications@github.com wrote:

@akariv https://github.com/akariv Thanks for the response. I just reconstituted my homebrew python3 install and venv via https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-macos and the dataflows tutorial works ok.

BTW, the CSV URL still needs updating to https://raw.githubusercontent.com/datahq/demo/master/first.csv

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/datahq/dataflows/issues/45#issuecomment-432827630, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQMdXOanGI8xuL_fBA03h1Om1CHh1u-ks5uoNXzgaJpZM4X43t1 .

rufuspollock commented 5 years ago

@akariv is this updated yet?

akariv commented 5 years ago

Yes - the problem was just on the blog post.