Michael Albonetti
Michael Albonetti

Reputation: 11

-bash: source: filename argument required

I'm working through a Python tutorial, and I attempted to pip install autoenv==1.0.0. I created the .env file in the dir

source env/bin/activate
export APP_SETTINGS="config.DevelopmentConfig"

and then ran these commands in the shell, outside of a venv

echo "source `which activate.sh`" >> ~/.bashrc
 source ~/.bashrc

I got back:

-bash: source: filename argument required
source: usage: source filename [arguments]

Come to find out, autoenv failed to install. I was able to get it to install and re-ran the above commands and now it works but I'm still getting the above message whenever I reload the terminal

How can I find and remove the source command or resolve it?

** edit: running which activate returns

23:24 $ which activate.sh
/usr/local/bin/activate.sh

I've looked in .bash_profile and can't find anything that seems related. I've looked in the .bashrc file and found a path to activate.sh, though the path has the file located in the bin which it is not.

Upvotes: 0

Views: 5991

Answers (1)

Michael Albonetti
Michael Albonetti

Reputation: 11

After running

grep source ~/.bash

suggested by Cyrus above, I found 3 random "Source" commands, after deleting them, the issue went away.

Thanks, Cyrus and Mihir for your help.

Upvotes: 1

Related Questions