elodie: Fix ImportError: No module named click

Hey,

Thanks for software - excited to have a play with it!

I have an error and, if it’s something you’re aware of, wondered if you can help me with a fix?:

Apple-MacBook-Pro:/ ldexterldesign$ cd Applications/Elodie
Apple-MacBook-Pro:Elodie ldexterldesign$ pwd
/Applications/Elodie
Apple-MacBook-Pro:Elodie ldexterldesign$ ./elodie.py import --destination="/Volumes/server/_foo" /Volumes/server/_todo/image/_foo
Traceback (most recent call last):
  File "./elodie.py", line 8, in <module>
    import click
ImportError: No module named click

Hope to hear back

Kind thanks

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

FYI NO REPLY NECESSARY

Just experienced this same issue and fixed it a bit more comprehensively this time with the #25 tip off

Pretty confident this time it’s a OS X Python vs Homebrew Python conflict which I fixed by reinstalling Homebrew Python version

NB You must call pip commands in Homebrew by using pip2:

pip2 install -r requirements.txt

Unsure exactly how this works but it should install the requirements so Homebrew Python can access them

Hope this is clear/useful

@jmathai perhaps worth updating the README?

Regards

Lewiss-MacBook-Pro:~ ldexterldesign$ brew uninstall --force python
Uninstalling python... (7,159 files, 97.5MB)
Lewiss-MacBook-Pro:~ ldexterldesign$ which python
/usr/bin/python
Lewiss-MacBook-Pro:~ ldexterldesign$ cd /Users/ldexterldesign/Applications/elodie
Lewiss-MacBook-Pro:elodie ldexterldesign$ pip install -r requirements.txt
-bash: pip: command not found
Lewiss-MacBook-Pro:elodie ldexterldesign$ brew python install
Error: Unknown command: python
Lewiss-MacBook-Pro:elodie ldexterldesign$ brew install python
==> Downloading https://homebrew.bintray.com/bottles/python-2.7.14.sierra.bottle.tar.gz
Already downloaded: /Users/ldexterldesign/Library/Caches/Homebrew/python-2.7.14.sierra.bottle.tar.gz
==> Pouring python-2.7.14.sierra.bottle.tar.gz
==> /usr/local/Cellar/python/2.7.14/bin/python2 -s setup.py --no-user-cfg install --force --verbose --single-version-externally-managed --record=installed.txt --install-scripts=/usr/local/Cellar/python/2.
==> /usr/local/Cellar/python/2.7.14/bin/python2 -s setup.py --no-user-cfg install --force --verbose --single-version-externally-managed --record=installed.txt --install-scripts=/usr/local/Cellar/python/2.
==> /usr/local/Cellar/python/2.7.14/bin/python2 -s setup.py --no-user-cfg install --force --verbose --single-version-externally-managed --record=installed.txt --install-scripts=/usr/local/Cellar/python/2.
==> Caveats
This formula installs a python2 executable to /usr/local/bin.
If you wish to have this formula's python executable in your PATH then add
the following to ~/.bash_profile:
  export PATH="/usr/local/opt/python/libexec/bin:$PATH"

Pip and setuptools have been installed. To update them
  pip2 install --upgrade pip setuptools

You can install Python packages with
  pip2 install <package>

They will install into the site-package directory
  /usr/local/lib/python2.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python.html
==> Summary
🍺  /usr/local/Cellar/python/2.7.14: 3,517 files, 48.4MB
Lewiss-MacBook-Pro:elodie ldexterldesign$   export PATH="/usr/local/opt/python/libexec/bin:$PATH"
Lewiss-MacBook-Pro:elodie ldexterldesign$ pip2 install -r requirements.txt
Requirement already satisfied: click==6.6 in /usr/local/lib/python2.7/site-packages (from -r requirements.txt (line 1))
Requirement already satisfied: requests==2.11.1 in /usr/local/lib/python2.7/site-packages (from -r requirements.txt (line 2))
Requirement already satisfied: Send2Trash==1.3.0 in /usr/local/lib/python2.7/site-packages (from -r requirements.txt (line 3))
Requirement already satisfied: future==0.16.0 in /usr/local/lib/python2.7/site-packages (from -r requirements.txt (line 4))
Requirement already satisfied: configparser==3.5.0 in /usr/local/lib/python2.7/site-packages (from -r requirements.txt (line 5))
Requirement already satisfied: tabulate==0.7.7 in /usr/local/lib/python2.7/site-packages (from -r requirements.txt (line 6))