Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line version doesn't seem to work with Bash Ubuntu on windows #11

Closed
mungojam opened this issue May 20, 2017 · 3 comments
Closed

Comments

@mungojam
Copy link

mungojam commented May 20, 2017

I run the pip install command, which runs without error, but cfn-flip is not found when I try running it. Maybe it's installed somewhere that isn't on the default path or something:

mark@MyComp:/$ pip install cfn_flip
Requirement already satisfied: cfn_flip in /home/mark/.local/lib/python2.7/site-packages
Requirement already satisfied: PyYAML in /home/mark/.local/lib/python2.7/site-packages (from cfn_flip)
Requirement already satisfied: six in /home/mark/.local/lib/python2.7/site-packages (from cfn_flip)

mark@MyComp:/$ cfn-flip
cfn-flip: command not found

mark@MyComp:/$ locate cfn-flip

mark@MyComp:/$

@GMartinez-Sisti
Copy link

GMartinez-Sisti commented May 23, 2017

Hi @mungojam,

I just tried it in a fresh install of Bash on Windows and it worked perfectly.

All I did was:

sudo apt-get install python-pip
sudo pip install cfn_flip

It was installed here:

user@folder$ whereis cfn-flip
cfn-flip: /usr/local/bin/cfn-flip

I already converted a template successfully.

Hope it helps.

Regards

@mungojam
Copy link
Author

mungojam commented May 23, 2017

Thanks for trying it out. You've led me to the source of the issue, which may be an issue with pip or bash on windows.

Above you are using sudo for the pip command, which isn't what the readme shows so I didn't use it. (Though I understand it's different for different OSes).

Uninstalling has shown me where the bin has ended up in my case (not sure why whereis doesn't find it, perhaps because it's in a hidden folder):

pip uninstall cfn_flip
Uninstalling cfn-flip-0.2.1:
  /home/mark/.local/bin/cfn-flip
 /home/mark/.local/lib/python2.7/site-packages/cfn_flip-0.2.1.dist-info/DESCRIPTION.rst
...

After uninstalling and reinstalling as sudo, I was able to get it to work, though I get a warning, which looks like a pip bug to me:

sudo pip install cfn_flip
The directory '/home/mark/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/mark/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting cfn_flip
Requirement already satisfied: PyYAML in /home/mark/.local/lib/python2.7/site-packages (from cfn_flip)
Requirement already satisfied: six in /home/mark/.local/lib/python2.7/site-packages (from cfn_flip)
Installing collected packages: cfn-flip
Successfully installed cfn-flip-0.2.1

@mungojam
Copy link
Author

I've raised an issue against BashOnWindows since it seems it is a fairly standard path for ubuntu that isn't being included.

Happy to close this, thanks for your help in diagnosing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants