Coder Social home page Coder Social logo

fish-pipenv's Introduction

fish-pipenv

Pipenv for the fish-shell.

Automatically activates your Pipenv shell when you cd into a directory containing a Pipenv project.

Basically, dope.

Note: this project was previously maintained by @kennethreitz

Installation

Using Fisher:

$ fisher add kennethreitz/fish-pipenv

Fancy

If your terminal supports pipenv shell --fancy, set the following environment variable in your ~/.config/fish/config.fish:

set pipenv_fish_fancy yes

Potential Issues

Mac OS

After installing pipenv, running the $ pipenv command may yield the following error Install http://docs.pipenv.org/en/latest/ to use this package.

Reason for the error

The problem is that, the pipenv package rightly could not find the pipenv command. The situation with fish shell is that it executes scripts in the /Users/user/.config/fish/config.d folder before executing config.fish and the pipenv package creates a link in the config.d folder hence it is executed before config.fish.

Now depending on how you installed pipenv or how soon your $PATH is loaded you could be faced with the above error.

Solutions

  1. You could install pipenv with the command $ pip3 install pipenv. Pipenv will then be installed in /usr/local/bin. On some systems the folder /usr/local/bin is added to $PATH by the system which means that it will be available before fish goes fishing for scripts in /Users/user/.config/fish/config.d

  2. Or you could create a file say 000-env.fish (or whatever you want to call it), and place it in /Users/user/.config/fish/config.d. In this file set the path to the folder where pipenv was installed. E.g if pipenv was installed via pipsi, then the command will be something like set -x PATH /Users/user/.local/bin $PATH

    If pipenv was installed via $ pip install pipenv, then note that pip (python2) now puts its executables in /usr/local/opt/python/libexec/bin.

    The 000 preface is to ensure that, that script will be executed first before the others in config.d. You don't have to prefix the file with 000 it is abitrary. Just give it a name that places it at the to of the pile.

  3. Or assuming you also have fish-pyenv you can add a universal variable to your fish_user_paths following mhugbin:

    set -U fish_user_paths ~/.pyenv/shims $fish_user_paths

See sentriz#1

fish-pipenv's People

Contributors

colde avatar jorgebucaran avatar kennethreitz avatar ovidner avatar parths007 avatar peterschutt avatar sentriz avatar shuuji3 avatar spool avatar techalchemy avatar timofurrer avatar tyilo avatar wy-z avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.