Question:
I downloaded Cygwin and Python version 2.5. Now I am about to set up an deep learning computer at aws (following this tutorial: https://www.youtube.com/watch?v=8rjRfW4JM2I)
If i run pip install awscli I get this (which is good)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$ pip install awscli Requirement already satisfied: awscli in c:\users\marc\anaconda2 \lib\site-packages Requirement already satisfied: s3transfer<0.2.0,>=0.1.9 in c:\users\marc\anaconda2\lib\site-packages (from awscli) Requirement already satisfied: rsa<=3.5.0,>=3.1.2 in c:\users\marc\anaconda2\lib\site-packages (from awscli) Requirement already satisfied: PyYAML<=3.12,>=3.10 in c:\users\marc\anaconda2\lib\site-packages (from awscli) Requirement already satisfied: docutils>=0.10 in c:\users\marc\anaconda2\lib\site-packages (from awscli) Requirement already satisfied: botocore==1.4.92 in c:\users\marc\anaconda2\lib\site-packages (from awscli) Requirement already satisfied: colorama<=0.3.7,>=0.2.5 in c:\users\marc\anaconda2\lib\site-packages (from awscli) Requirement already satisfied: futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" in c:\users\marc\anaconda2\lib\site- packages (from s3transfer<0.2.0,>=0.1.9->awscli) Requirement already satisfied: pyasn1>=0.1.3 in c:\users\marc\anaconda2\lib\site-packages (from rsa<=3.5.0,>=3.1.2->awscli) Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in c:\users\marc\anaconda2\lib\site-packages (from botocore==1.4.92->awscli) Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in c:\users\marc\anaconda2\lib\site-packages (from botocore==1.4.92->awscli) Requirement already satisfied: six>=1.5 in c:\users\marc\anaconda2\lib\site-packages (from python-dateutil<3.0.0,>=2.1->botocore==1.4.92->awscli) |
However when I want to configure everything and type aws I get:
1 2 3 |
$ aws C:\Users\Marc\Anaconda2\python.exe: can't open file '/cygdrive/c/Users/Marc/Anaconda2/Scripts/aws': [Errno 2] No such file or directory |
Answer:
I got on track with the answer by Ryan Chase (however I can’t comment on his answer due to insufficient credit on stackoverflow)
after step 4: apt-cyg install python
,
which python
would return the desired usr/bin/python
.
However, running python -i
from cygwin still opened up my local anaconda python instead of the cygwin python.
I ended up using this workflow:
pip uninstall awscli
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
apt-cyg install python
wget https://bootstrap.pypa.io/get-pip.py
/bin/python ~/get-pip.py
/bin/pip install awscli
/bin/aws
etc. so each time, use /bin/...
to force cygwin to use it’s local version of the program. It’s pretty cumbersome, maybe I’ll look into better ways of getting cygwin to prefer it’s own version of python over the anaconda version.
I also needed to change the setup files from windows to unix style, so:
apt-cyg install dos2unix
dos2unix setup_p2.sh
dos2unix setup_instance.sh
then finally, bash setup_p2.sh