I had the same problem. Essentially, the only solution is 9000. I have a script installation shell inside which I configure the conda environment (the source activates python2), then I invoke the make command. I experimented with setting up the environment from the Makefile and without success.
I have this line in my makefile:
installpy : ./setuppython2.sh && python setup.py install
Error messages:
make ./setuppython2.sh && python setup.py install running install error: can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/test-easy-install-29183.write-test'
Essentially, I was able to configure the conda environment to use my local conda, which I have access to. But this is not picked up by the make process. I do not understand why the environment installed in my shell script using the "source" is not visible in the make process; The original command should change the current shell. I just want to share this so that other people do not try to do this. I know autotoools has a way to work with python. But make is probably limited in this regard.
My current solution is a shell script:
cat py2make.sh
#!/bin/sh
This seems to work well for me.
In a similar situation, there was a solution, but it doesn't seem to work for me:
My modified segment Makefile:
installpy : ( source activate python2; python setup.py install )
Error message after calling make:
make ( source activate python2; python setup.py install ) /bin/sh: line 0: source: activate: file not found make: *** [installpy] Error 1
I donβt know where I am mistaken. If anyone has a better solution, share it.
source share