UPDATED:
I’ve solved a few of the installation issues I had when trying to set up AWS in lecture 0: http://course.fast.ai/lessons/aws.html. See below for a description of the issues and some advice as to what worked for me in the end:
The primary issue was that the cygwin didn’t come with python installed, and didn’t know where to find the existing Windows Anaconda version on my machine. This was verified by running which python
from within cygwin - it couldn’t find where python is saved. Note that when I ran pip install awscli
though, cygwin didn’t throw an error message. Cygwin actually installs awscli in the Window’s Anaconda installation of Python (I find this odd since we didn’t run conda install awscli
).
Here are two posts explain the issue and offer different solutions:
-
the course wiki: (http://wiki.fast.ai/index.php/Awscli_in_cygwin
- From my understanding, this post recommends installing a cygwin-specific version of python, then reinstalling awscli using pip.
- For some reason though when I ran the first command,
pip uninstall awscli
it “hung up” my cygwin (Therefore, I switched to approach 2 below which worked)
-
this site: https://www.davidbaumgold.com/tutorials/set-up-python-windows/#installing-cygwin
- This post worked for me. It recommends telling cygwin where to find your already installed version of python by running
echo "PATH=\$PATH:/cygdrive/c/Python32" >> .bash_profile
within cygwin (note for this to work you need tocd
all the way to your user directory). - In my case my python was saved in my Anaconda file (which can be confirmed by running
which python
in the terminal), so I ranecho "PATH=\$PATH:/cygdrive/C:/Users/rchase/AppData/Local/Continuum/Anaconda2/python.exe" >> .bash_profile
- Notice that “/cygdrive/” is inserted before the C: drive. This is normal behavior when using a Unix-based terminal such as cygwin
- The next step is to confirm that cygwin can now find the python.exe by typing
which python
in cygwin. - If cygwin is able to locate python, then using cygwin just
cd
to the Anaconda Scripts directory where aws should be saved, i.e.cd c:/Users/rchase/AppData/Local/Continuum/Anaconda2/Scripts
- From in the scripts file, as long as aws is in there (in my case I had already run
pip install awscli
before), you should be able to runpython aws
in cygwin to run the aws python script (or type./aws
which locates the appropriate executable to run aws, in this case it’s python).
- This post worked for me. It recommends telling cygwin where to find your already installed version of python by running
This seems to have solved the immediate issue. However, in order for the python aws
command to work, I actually need to be in the Scripts directory (so that it knows where to find aws), or I need to keep using the full path directory every time: i.e. python C:/Users/rchase/AppData/Local/Continuum/Anaconda2/Scripts/aws. However, now I’m not sure where to save or how to run the setup_p2.sh script…