taylormitchell / ankify_roam

A command-line tool which brings flashcards created in Roam to Anki.
MIT License
36 stars 6 forks source link

zsh: command not found: ankify_roam #4

Closed jeanhdev closed 4 years ago

jeanhdev commented 4 years ago

Hi,

I've installed ankify_roam using pip. However I can't get passed this error :

zsh: command not found: ankify_roam

I can't get over it... any idea? Thank you for building such a tool!

taylormitchell commented 4 years ago

Hey jeadev,

Can you walk me through all the steps you took to get there? Something like:

Steps to reproduce the behavior:

  1. Open terminal
  2. Execute pip install ankify-roam
  3. Output: ...
  4. Execute ankify_roam add my_repo.json
  5. See bug: zsh: command not found: ankify_roam

Also some information about your environment so I can reproduce it:

jeanhdev commented 4 years ago

Hey Taylor, sorry for the delay. I think the problem is in the fact that I can't run ankify_roam in my mac terminal and I don't know why... maybe I need to cd in a specific folder ?

➜ ~ pip install ankify-roam WARNING: The directory '/Users/user/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Requirement already satisfied: ankify-roam in ./Library/Python/3.8/lib/python/site-packages (0.0.6)

➜ ~ ankify_roam add my_repo.json zsh: command not found: ankify_roam

OS 11.0 Big Sur

Python version ➜ ~ python --version Python 2.7.16 ➜ ~ python3 --version Python 3.8.5

pip version ➜ ~ pip --version pip 20.2.3 from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip (python 3.8)

taylormitchell commented 4 years ago

It looks like some kind of permissions issue which is preventing it from being installed. I'm not really sure what's going on there... Let's try setting you up similar to my set up and see if that works:

  1. First just remove anything that was installed: pip uninstall ankify-roam
  2. Then download and install the miniconda python distribution: https://conda.io/projects/conda/en/latest/user-guide/install/macos.html
  3. Once finished, make sure to close and then reopen your terminal
  4. Run which python. It should output something like this but with your username instead of mine. This confirms that you're now using the miniconda3 version of python: /Users/taylormitchell/miniconda3/bin/python
  5. Follow the same steps you did before: pip install ankify-roam, etc..
jeanhdev commented 4 years ago

Installing miniconda solved it ! Thank you so much