Skip to content

Error on startup on mac -- No module named 'pytz' even though its installed #246

@arooni

Description

@arooni

mac catalina 15.2

Error detected while processing function provider#python3#Call:
line   18:
Error invoking 'python_execute_file' on channel 3 (python3-script-host):
Traceback (most recent call last):
  File "/Users/david/.vim/plugged/taskwiki/taskwiki/main.py", line 15, in <module>
    from taskwiki import cache as cache_module
  File "/Users/david/.vim/plugged/taskwiki/taskwiki/cache.py", line 6, in <module>
    from taskwiki import viewport
  File "/Users/david/.vim/plugged/taskwiki/taskwiki/viewport.py", line 6, in <module>
    from taskwiki import vwtask
  File "/Users/david/.vim/plugged/taskwiki/taskwiki/vwtask.py", line 7, in <module>
    from tasklib import Task
  File "/Users/david/Library/Python/3.7/lib/python/site-packages/tasklib/__init__.py", line 1, in <module>
    from .backends import TaskWarrior
  File "/Users/david/Library/Python/3.7/lib/python/site-packages/tasklib/backends.py", line 11, in <module>
    from .task import Task, TaskQuerySet, ReadOnlyDictView
  File "/Users/david/Library/Python/3.7/lib/python/site-packages/tasklib/task.py", line 10, in <module>
    from .serializing import SerializingObject
  File "/Users/david/Library/Python/3.7/lib/python/site-packages/tasklib/serializing.py", line 4, in <module>
    import pytz
ModuleNotFoundError: No module named 'pytz'
Error invoking 'python_execute' on channel 3 (python3-script-host):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'cache' is not defined
E173: 68 more files to edit
Press ENTER or type command to continue

output of :checkhealth provider

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: pbcopy

## Python 2 provider (optional)
  - INFO: pyenv: Path: /usr/local/Cellar/pyenv/1.2.15/libexec/pyenv
  - INFO: pyenv: $PYENV_ROOT is not set. Infer from `pyenv root`.
  - WARNING: pyenv: Root does not exist: /Users/david/.pyenv. Ignoring pyenv for all following checks.
  - WARNING: No Python executable found that can `import neovim`. Using the first available executable for diagnostics.
  - ERROR: Python provider error:
    - ADVICE:
      - provider/pythonx: Could not load Python 2:
          /usr/bin/python2 does not have the "neovim" module. :help |provider-python|
          /usr/bin/python2.7 does not have the "neovim" module. :help |provider-python|
          python2.6 not found in search path or not executable.
          /usr/bin/python does not have the "neovim" module. :help |provider-python|
  - INFO: Executable: Not found

## Python 3 provider (optional)
  - INFO: pyenv: Path: /usr/local/Cellar/pyenv/1.2.15/libexec/pyenv
  - INFO: pyenv: $PYENV_ROOT is not set. Infer from `pyenv root`.
  - WARNING: pyenv: Root does not exist: /Users/david/.pyenv. Ignoring pyenv for all following checks.
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Executable: /usr/bin/python3
  - INFO: Python version: 3.7.3
  - INFO: pynvim version: 0.4.0
  - OK: Latest pynvim is installed.

## Ruby provider (optional)
  - INFO: Ruby: ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin18]
  - WARNING: `neovim-ruby-host` not found.
    - ADVICE:
      - Run `gem install neovim` to ensure the neovim RubyGem is installed.
      - Run `gem environment` to ensure the gem bin directory is in $PATH.
      - If you are using rvm/rbenv/chruby, try "rehashing".
      - See :help |g:ruby_host_prog| for non-standard gem installations.

## Node.js provider (optional)
  - INFO: Node.js: v13.5.0
  - INFO: Neovim node.js host: /usr/local/lib/node_modules/neovim/bin/cli.js
  - OK: Latest "neovim" npm/yarn package is installed: 4.7.0

thought i already had the libraries installed

[I]  ~/.v/p/taskwiki   master ±  pip3 install tzlocal six pytz
Requirement already satisfied: tzlocal in /usr/local/lib/python3.7/site-packages (1.5.1)
Requirement already satisfied: six in /usr/local/lib/python3.7/site-packages (1.11.0)
Requirement already satisfied: pytz in /usr/local/lib/python3.7/site-packages (2018.5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions