# virtualenv "Not found"



## Sato (Oct 12, 2017)

Hi,

I have setup a virtualenv with success on my FreeBSD with this command:

`virtualenv -p /usr/local/bin/python3 venv`

But when i want to activate the virtual environement with this command:

`source venv/bin/activate`

I obtain this response form terminal: /bin/sh: source: not found

An idea of this problem ?

Thx


----------



## p3rj (Oct 12, 2017)

Hi, if you're actually running sh as your shell, it may not have a source command. But

`. venv/bin/activate`

should do the trick.

- Peter


----------



## SirDice (Oct 12, 2017)

The `source` command doesn't exist with FreeBSD's sh(1). The script probably assumes you're running bash(1) in compatibility mode.


----------



## Oko (Oct 14, 2017)

SirDice said:


> The `source` command doesn't exist with FreeBSD's sh(1). The script probably assumes you're running bash(1) in compatibility mode.


Right on money! Bashism are pissing me off so badly. Net is full of Bash crap. Besides the fact that it is broken, Bash is a security nightmare.


----------



## Maxnix (Oct 14, 2017)

Oko said:


> Right on money! Bashism are pissing me off so badly. Net is full of Bash crap. Besides the fact that it is broken, Bash is security nightmare.


And despite everything there are still a lot of ports that unfortunately depend on it, directly (195 actually) or not. Fortunately, I was able to use alternatives to such programs, and got rid of bash (I hope) definitively.


----------



## p3rj (Oct 14, 2017)

FWIW, the virtualenv documentation at https://virtualenv.pypa.io/en/stable/userguide/ actually hints at using . instead of source for activate with Bourne shell. So it may just work (personally I mostly use zsh, so I haven't tried).


----------



## tobik@ (Oct 14, 2017)

It does work fine with sh(1). Not sure what all the fuss is about here


----------

