mitsuhiko / pipsi

pip script installer
Other
2k stars 133 forks source link

No module named 'pipsi' error #116

Open mudox opened 6 years ago

mudox commented 6 years ago

Had a much hard try, but with no luck

pipsi warned about not including ~/.local/bin in PATH, while it actually did, see below echo $PATH ... line

Can anybody give me some clue where the problem maybe ?

/usr/local/bin ❯ curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4130 100 4130 0 0 1293 0 0:00:03 0:00:03 --:--:-- 1293 Installing pipsi Using base prefix '/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6' New python executable in /Users/mudox/.local/venvs/pipsi/bin/python3.6 Also creating executable in /Users/mudox/.local/venvs/pipsi/bin/python Installing setuptools, pip, wheel...done. Collecting pipsi Collecting Click (from pipsi) Using cached click-6.7-py2.py3-none-any.whl Collecting virtualenv (from pipsi) Using cached virtualenv-15.1.0-py2.py3-none-any.whl Installing collected packages: Click, virtualenv, pipsi Successfully installed Click-6.7 pipsi-0.9 virtualenv-15.1.0 Installed pipsi binary in /Users/mudox/.local/bin

============================================================

Warning: It looks like /Users/mudox/.local/bin is not on your PATH so pipsi will not work out of the box. To fix this problem make sure to add this to your .bashrc / .profile file:

export PATH=/Users/mudox/.local/bin:$PATH

============================================================

pipsi is now installed.

/usr/local/bin 21s ❯ pipsi Traceback (most recent call last): File "/Users/mudox/.local/bin//pipsi", line 7, in from pipsi import cli ModuleNotFoundError: No module named 'pipsi'

/usr/local/bin ❯ echo $PATH | tr : '\n' /Users/mudox/.local/bin/ /Users/mudox/.luarocks/bin /usr/local/bin /usr/local/opt/coreutils/libexec/gnubin /usr/local/sbin /Users/mudox/cargo/bin /Users/mudox/.gem/bin /Users/mudox/.bin /usr/bin /bin /usr/sbin /sbin /Users/mudox/.antigen/bundles/robbyrussell/oh-my-zsh/lib /Users/mudox/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git /Users/mudox/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git-extras /Users/mudox/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git-flow /Users/mudox/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/brew /Users/mudox/.antigen/bundles/zsh-users/zsh-completions/src /Users/mudox/.antigen/bundles/zsh-users/zsh-syntax-highlighting /Users/mudox/.antigen/bundles/zsh-users/zsh-history-substring-search /Users/mudox/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/copydir /Users/mudox/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/copyfile /Users/mudox/Develop/Shell/fzf-cmdhub /Users/mudox/Develop/Python/gitz /Users/mudox/.antigen/bundles/djui/alias-tips /Users/mudox/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/tmux /Users/mudox/.antigen/bundles/robbyrussell/oh-my-zsh/plugins/battery /Users/mudox/.antigen/bundles/rupa/z /Users/mudox/.antigen/bundles/mafredri/zsh-async /Users/mudox/.antigen/bundles/sindresorhus/pure /Users/mudox/Git/vim-config/plugged/fzf/bin /Users/mudox/Develop/go/bin /Users/mudox/.rvm/bin /Users/mudox/.rvm/bin

hynek commented 6 years ago

I just ran into this bug too. It seems that pipsi can’t find its virtualenv’s python (FWIW, I use fish) and so the shebang points to the global python which hasn’t pipsi installed in it. For now, you can fix your installation yourself by pointing it to YOUR-HOME-DIR/.local/venvs/pipsi/bin/python

stuartsierra commented 6 years ago

I was able to resolve the same issue with @hynek's suggestion. To elaborate a bit, I edited the file ~/.local/bin/pipsi to replace the first line with:

#!/Users/stuart/.local/venvs/pipsi/bin/python

Obviously, you will need to replace /Users/stuart with your own home directory.

This is on OS X with Python 3.6 installed via Homebrew, using Bash.