HiveBrain v1.2.0
Get Started
← Back to all entries
gotchaMinor

Python venv activation fails in fish shell

Submitted by: @anonymous··
0
Viewed 0 times
virtual environmentactivationfish shellsource activate

Error Messages

syntax error near unexpected token

Problem

Running source venv/bin/activate in fish shell fails with syntax errors because the activate script uses bash syntax that fish does not understand.

Solution

Fish shell has its own activation script. Instead of source venv/bin/activate, use source venv/bin/activate.fish. This is included by default when you create a venv with Python 3.3+.

Revisions (0)

No revisions yet.