Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs a sudo pip install pathlib on Raspberry PI #336

Closed
mlk opened this issue Aug 14, 2015 · 10 comments
Closed

Needs a sudo pip install pathlib on Raspberry PI #336

mlk opened this issue Aug 14, 2015 · 10 comments
Labels

Comments

@mlk
Copy link
Contributor

mlk commented Aug 14, 2015

Might be worth adding in the readme somewhere.

@mcarton
Copy link
Contributor

mcarton commented Aug 14, 2015

This is already taken care of.
How did you install The Fuck?

@mlk
Copy link
Contributor Author

mlk commented Aug 15, 2015

$ sudo apt-get install python-pip python-dev
$ sudo pip install psutil thefuck
Requirement already satisfied (use --upgrade to upgrade): psutil in /usr/local/lib/python2.7/dist-packages
Downloading/unpacking thefuck
  Downloading thefuck-2.7.tar.gz (47Kb): 47Kb downloaded
  Running setup.py egg_info for package thefuck

Requirement already satisfied (use --upgrade to upgrade): colorama in /usr/local/lib/python2.7/dist-packages (from thefuck)
Requirement already satisfied (use --upgrade to upgrade): six in /usr/local/lib/python2.7/dist-packages (from thefuck)
Installing collected packages: thefuck
  Running setup.py install for thefuck

    Installing thefuck-alias script to /usr/local/bin
    Installing thefuck script to /usr/local/bin
Successfully installed thefuck

$ fuck
Traceback (most recent call last):
  File "/usr/local/bin/thefuck", line 9, in <module>
    load_entry_point('thefuck==2.7', 'console_scripts', 'thefuck')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 337, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2279, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python2.7/dist-packages/thefuck/main.py", line 3, in <module>
    from pathlib import Path
ImportError: No module named pathlib

$ sudo pip install pathlib
Downloading/unpacking pathlib
  Downloading pathlib-1.0.1.tar.gz (49Kb): 49Kb downloaded
  Running setup.py egg_info for package pathlib

Installing collected packages: pathlib
  Running setup.py install for pathlib

Successfully installed pathlib
Cleaning up...

$ apt-get install thefuckworksnow
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

$ fuck
sudo apt-get install thefuckworksnow [enter/↑/↓/ctrl+c]

OS Version:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.8 (wheezy)
Release:        7.8
Codename:       wheezy

Python version:

 $ python --version
Python 2.7.3

PIP version

$ pip --version
pip 1.1 from /usr/lib/python2.7/dist-packages (python 2.7)

Anything else you need please let me know,

@SanketDG
Copy link
Contributor

@mlk You might want to upgrade pip though. Your version is ancient, although I am not sure that doing that would fix this.

@mcarton
Copy link
Contributor

mcarton commented Aug 15, 2015

It seems pip ignored that extras_require kind of marker until version 6.0.

@nvbn
Copy link
Owner

nvbn commented Aug 16, 2015

@mcarton I guess I should add something like install script that used in docker-compose (https://github.com/docker/compose) for fixing dependencies problems.

@sylvainar
Copy link

Hey guys !

I've successfully installed The Fuck on my Raspberry Pi, it's awesome !

The only problem is that it's really, really slow (I've got a result 2 or 3 seconds after I typed "fuck"). Do you know why ?

Thanks !

@mcarton
Copy link
Contributor

mcarton commented Aug 26, 2015

The slowness has already been reported.
The problem is that there are now a lot of rules, each taking a small amount of time. Unfortunately maths are against us there.
Try deactivating some rules you don't use (eg. the history, which is the slowest as far as I know).
I also noticed that getting the aliases list from the shell is quiet slow. On my system this takes up to 400ms, about half the time needed to execute fuck:

% time zsh -ic alias
…            
zsh -ic exit  0.35s user 0.04s system 96% cpu 0.410 total

I should clean up my .zshrc.
And of course, a raspberry pi is not the fastest computer there is.

@SanketDG
Copy link
Contributor

#345 fixes a lot of slowness problems. Make sure you have version 2.8.

@mcarton
Copy link
Contributor

mcarton commented Aug 26, 2015

@SanketDG Well, #345 really fixes one problem, but it had the most important overhead for me. And the fix is indeed included in 2.8.

@nvbn nvbn added the obsolete label Mar 14, 2017
@nvbn
Copy link
Owner

nvbn commented Mar 14, 2017

We're checking pip version in setup.py already for a while, so this issue is obsolete.

@nvbn nvbn closed this as completed Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants