lord63 / tldr.py

A python client for tldr: simplified and community-driven man pages.
MIT License
186 stars 18 forks source link

Unable to run on Python 2.7.11 #10

Closed jjwon0 closed 8 years ago

jjwon0 commented 8 years ago

I installed tldr.py using pip install tldr.py on Python 2.7.11, but the compiled version doesn't appear to work for me.

~
❯ pip2 install tldr.py
Collecting tldr.py
  Using cached tldr.py-0.2.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): click>=5.0 in ./.pyenv/versions/2.7.11/lib/python2.7/site-packages (from tldr.py)
Requirement already satisfied (use --upgrade to upgrade): PyYAML>=3.11 in ./.pyenv/versions/2.7.11/lib/python2.7/site-packages (from tldr.py)
Installing collected packages: tldr.py
Successfully installed tldr.py-0.2.0

# I tried running the uncompiled binary using `pip install -e .` after cloning the repo
~
❯ tldr
Traceback (most recent call last):
  File "/Users/jjwon/.pyenv/versions/2.7.11/bin/tldr", line 9, in <module>
    load_entry_point('tldr.py==0.2.0', 'console_scripts', 'tldr')()
  File "/Users/jjwon/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/jjwon/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
    return ep.load()
  File "/Users/jjwon/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "/Users/jjwon/.pyenv/versions/2.7.11/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named cli

It works on my computer with Python 2.7.10, Python 3.4, but not this version.

lord63 commented 8 years ago

Hi, I'm also using pyenv with python 2.7.11, works for me here, my environment is Linux Mint 17.1

➜  ~  which tldr
/home/lord63/.pyenv/shims/tldr
➜  ~  python --version
Python 2.7.11
➜  ~  tldr
Usage: tldr [OPTIONS] COMMAND [ARGS]...

  A python client for tldr: simplified and community-driven man pages.

Options:
  -V, --version  Show the version and exit.
  -h, --help     Show this message and exit.

Commands:
  find    Find the command usage.
  init    Init config file.
  update  Update to the latest pages.

So I can't reproduce this problem. Uninstall and install it again works?

jjwon0 commented 8 years ago

Resolved after reinstalling my pyenv environment. Something must have gotten corrupted, probably pip somehow. Should have guessed it was a configuration bug since the error seemed pretty suspicious.

Cheers!