HDI-Project / ATM

Auto Tune Models - A multi-tenant, multi-data system for automated machine learning (model selection and tuning).
https://hdi-project.github.io/ATM/
MIT License
525 stars 141 forks source link

ImportError: No module named 'atm' - Update installation docs #125

Closed beevabeeva closed 5 years ago

beevabeeva commented 5 years ago

when attempting to run the example from the docs page, I receive the following error: python scripts/enter_data.py Traceback (most recent call last): File "scripts/enter_data.py", line 7, in <module> from atm import PROJECT_ROOT ImportError: No module named 'atm' I tried this first on Kali Linux, then on CentOS7. My Kali configuration was using python3.6 (I think). The CentOS machine is as follows:

  1. Operating System: CentOS7
  2. Python version: 2.7 (system default) .......(I tried 3.5 as well with the same result)
  3. virtualenv setup: virtualenv atm-env (as specified in the docs in step 3: https://atm.readthedocs.io/en/latest/setup.html)

to reproduce the the behaviour, try these steps:

  1. git clone https://github.com/hdi-project/atm.git ./atm
  2. install mysql-server mysql-client (this is a little tricky on CentOS: https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-centos-7). 2.5 go to atm directory where project was cloned to.
  3. $ sudo apt-get install python-pip $ sudo pip install virtualenv
  4. $ virtualenv atm-env $ . atm-env/bin/activate
  5. (atm-env) $ pip install -r requirements.txt
  6. python scripts/enter_data.py

Thanks for your help @csala !

Kind regards.

csala commented 5 years ago

Thanks for reporting this @beevabeeva !

I was indeed able to reproduce the problem following your steps.

The problem is in the pip install -r requirements.txt, which is not entirely right anymore.

Can you try using python setup.py install instead?

This is the command specified in the README, but apparently the RTD where not properly updated.

NOTE: Remember about activating the virtualenv before running it!

$ cd path/to/atm
$ . atm-env/bin/activate
(atm-env) $ python setup.py install
(atm-env) $ python scripts/enter_data.py

If this works, please report here but leave the issue open. We will use this as a reminder to update the corresponding line in the docs.

beevabeeva commented 5 years ago

Thank you so much!

That seems to have fixed it.

Glad to help.

It might be worth mentioning in the docs that one needs to install header files and static libraries for python dev: yum install python-devel.x86_64 (for python2). This might just be a CentOS thing though.

csala commented 5 years ago

Renaming this according to the actual task that needs to be done.

csala commented 5 years ago

Thank you so much!

That seems to have fixed it.

Glad to help.

It might be worth mentioning in the docs that one needs to install header files and static libraries for python dev: yum install python-devel.x86_64 (for python2). This might just be a CentOS thing though.

Thanks for giving up feedback about this @beevabeeva !

csala commented 5 years ago

Already fixed after v0.1.1