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

Pip install --azure-cli fails on Ubuntu 14.04 #2366

Closed
devigned opened this issue Mar 3, 2017 · 7 comments
Closed

Pip install --azure-cli fails on Ubuntu 14.04 #2366

devigned opened this issue Mar 3, 2017 · 7 comments
Labels

Comments

@devigned
Copy link
Member

devigned commented Mar 3, 2017

Steps to reproduce:

Create a new VM

az vm create -g ${project_id} -n ${vm_name} --admin-username deploy --image UbuntuLTS

SSH into the VM and run

deploy@habitat-dev:~$sudo apt-get install python-pip
deploy@habitat-dev:~$pip install --user azure-cli
deploy@habitat-dev:~$ pip install --user azure-cli
Downloading/unpacking azure-cli
  Downloading azure_cli-2.0.0-py2.py3-none-any.whl
Downloading/unpacking azure-cli-network (from azure-cli)
  Downloading azure_cli_network-2.0.0-py2.py3-none-any.whl (243kB): 243kB downloaded
Downloading/unpacking azure-cli-appservice (from azure-cli)
  Could not find a version that satisfies the requirement azure-cli-appservice (from azure-cli) (from versions: 0.1.1b1, 0.1.1b5, 0.1.1b2, 0.1.0b11, 0.1.1b4, 0.1.0b9, 0.1.1b5, 0.1.1b2, 0.1.0b10, 0.1.1b3, 0.1.0b9, 0.1.0b11, 0.1.1b1, 0.1.0b10, 0.1.1b3, 0.1.1b4)
Cleaning up...
No distributions matching the version for azure-cli-appservice (from azure-cli)
Storing debug log for failure in /home/deploy/.pip/pip.log

deploy@habitat-dev:~$ python --version
Python 2.7.6
@devigned
Copy link
Member Author

devigned commented Mar 3, 2017

16.04 seemed to work just fine afterapt-get install build-essential libssl-dev libffi-dev python-dev

@tjprescott
Copy link
Member

I experienced the same issue, even after installing the prerequisites. The curl script was successful. @derekbekoe is there a way to run the curl script with prompts?

@derekbekoe
Copy link
Member

This looks the same as #1308.
Old versions of pip require the --pre flag to get prerelease packages.

@tjprescott
Copy link
Member

tjprescott commented Mar 3, 2017

Running with --pre failed for a different reason, but for @devigned here's what did work (thanks to @derekbekoe):

After you install the pre-reqs, run:
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py

This will install the latest version of PIP. If you do what Ubuntu suggest and do sudo apt-get install python-pip you will get an ancient version of pip that will not work. Then run:
pip install --user --upgrade azure-cli
(This is because Ubuntu has an old version of requests that will cause an error...)

export PATH=$PATH:~/.local/bin

THEN... az should work for you. 😄

@devigned
Copy link
Member Author

devigned commented Mar 3, 2017

@derekbekoe pip install --user azure-cli --pre also failed

@tjprescott
Copy link
Member

Ultimately the reason this failed was the ancient version of Pip that Ubuntu 14 fetches with apt-get. @devigned are there any remaining action items for this issue or can it be closed?

@devigned
Copy link
Member Author

devigned commented Mar 7, 2017

Nah, we can close this. I mostly wanted to make sure there was an issue out here for this as it's likely someone will come across this.

@devigned devigned closed this as completed Mar 7, 2017
@derekbekoe derekbekoe added the FAQ label Mar 7, 2017
@tjprescott tjprescott changed the title pip install --user azure-cli fails Pip install --azure-cli fails on Ubuntu 14.04 Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants