1

I am trying to create a makefile to compile a full project.

I want to start by creating a virtualenv variable inside it using mkvirtualenv wrapper like:

train: create_env
    echo "create env?"

create_env:
    ( \
    mkvirtualenv -p python3.6 RC_RSC_env; \
    )

but I am getting this error:

( \
mkvirtualenv -p python3.6 RC_RSC_env; \
)
/bin/sh: 2: mkvirtualenv: not found
Makefile:6: recipe for target 'create_env' failed
make: *** [create_env] Error 127
5
  • Does it work if you use the full path to the mkvirtualenv command? See type -a mkvirtualenv. – terdon Jan 27 at 14:26
  • @terdon, sorry I can't find the full path. The output doesn't contain any directory! – user_007 Jan 27 at 14:31
  • Please edit your question and explain what this mkvirtualenv thing is. Also show us the output of type -a mkvirtualenv. The normal command for creating python venvs is virtualenv as far as I know. – terdon Jan 27 at 14:38
  • 1
    @terdon please keep in mind that type -a causes a syntax error with most shells,so never use -a in such a context.In special since it is unknown what has been installed as /bin/sh. – schily Jan 31 at 14:29
  • 1
    Thanks, @schily, I thought it was more portable than that. – terdon Jan 31 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.