DEV Community

Ahsanuzzaman Khan
Ahsanuzzaman Khan

Posted on

How to activate `virtualenv` in Fish (Friendly interactive shell)?

Problem

If you used to be a bash shell user and then decided to move to fish, you will probably face a problem with activating your python virtual environment.

The typical method to activate a virtualenv is:

$ source your_env_name/bin/activate

This fails in Fish shell:

source: Error while reading file “your_env_name/bin/activate”

Solution

The solution to this problem was much a lot easier than googling it. Thankfully, virtualenv ships with an activation script for specifically for Fish. Use that instead:

$ source your_env_name/bin/activate.fish

Top comments (0)