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

az component update --add fails with uninformative error #1998

Closed
itowlson opened this issue Feb 7, 2017 · 5 comments
Closed

az component update --add fails with uninformative error #1998

itowlson opened this issue Feb 7, 2017 · 5 comments

Comments

@itowlson
Copy link

itowlson commented Feb 7, 2017

I am using CLI 0.1.1b3 on Windows. It has the component module v0.1.0rc2 installed. When I run az component update --add redis it fails with the following error:

An error occurred. Run command with --debug for more information. If executing az with sudo, you may want sudo's -E and -H flags.

az --version output:

azure-cli (0.1.1b3)

acr (0.1.1b2)
acs (0.1.1b1)
appservice (0.1.1b1)
cloud (0.1.1b2)
component (0.1.0rc2)
configure (0.1.1b1)
container (0.1.1b1)
context (0.1.1b1)
core (0.1.1b3)
feedback (0.1.1b2)
network (0.1.1b1)
nspkg (0.1.2)
profile (0.1.1b2)
resource (0.1.1b1)
role (0.1.1b2)
storage (0.1.1b2)
vm (0.1.1b1)

Python (Windows) 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul  5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]

Running component update with the --debug flag produces the output in the attached file.

component-add.txt

I am running as admin (elevated command prompt).

@derekbekoe
Copy link
Member

@itowlson thanks for including the attached file.

pip.basecommand : Cannot remove entries from nonexistent file c:\users\itowlson\appdata\local\continuum\anaconda3\lib\site-packages\easy-install.pth

Looks like the error is in this line.

This has been reported in Anaconda - ContinuumIO/anaconda-issues#542. There's lots of discussion on that issue but one of these commands may help.

conda update setuptools

suggested at ContinuumIO/anaconda-issues#542 (comment)

pip install --ignore-installed --upgrade pip setuptools

suggested at tensorflow/tensorflow#3324 (comment)

@itowlson
Copy link
Author

itowlson commented Feb 7, 2017

@derekbekoe Thanks for the quick and detailed response. After running (both) those commands, I still get the same "An error occurred" message, but the detailed trace is different (attached if you want to take a look). This looks more like it may be related to Azure CLI components. But perhaps it is a cascading effect of an underlying Anaconda bug. Should I consider uninstalling Anaconda and installing raw Python instead?

component-add-after-updating-setuptools.txt

Traceback (most recent call last):
  File "C:\Users\itowlson\AppData\Local\Continuum\Anaconda3\lib\shutil.py", line 538, in move
    os.rename(src, real_dst)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'c:\\users\\itowlson\\appdata\\local\\continuum\\anaconda3\\lib\\site-packages\\azure\\cli\\command_modules\\network\\mgmt_express_route_circuit\\lib\\models\\__pycache__\\express_route_circuit_creation_client_enums.cpython-35.pyc' -> 'C:\\Users\\itowlson\\AppData\\Local\\Temp\\pip-y1fv359h-uninstall\\users\\itowlson\\appdata\\local\\continuum\\anaconda3\\lib\\site-packages\\azure\\cli\\command_modules\\network\\mgmt_express_route_circuit\\lib\\models\\__pycache__\\express_route_circuit_creation_client_enums.cpython-35.pyc'

During handling of the above exception, another exception occurred:

<...snip...>

  File "C:\Users\itowlson\AppData\Local\Continuum\Anaconda3\lib\shutil.py", line 115, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\itowlson\\AppData\\Local\\Temp\\pip-y1fv359h-uninstall\\users\\itowlson\\appdata\\local\\continuum\\anaconda3\\lib\\site-packages\\azure\\cli\\command_modules\\network\\mgmt_express_route_circuit\\lib\\models\\__pycache__\\express_route_circuit_creation_client_enums.cpython-35.pyc'

@derekbekoe
Copy link
Member

derekbekoe commented Feb 8, 2017

You have run into this #1221.

Windows has a file path length of 260 chars.
Anaconda attempts to write a file to 'C:\Users\itowlson\AppData\Local\Temp\pip-y1fv359h-uninstall\users\itowlson\appdata\local\continuum\anaconda3\lib\site-packages\azure\cli\command_modules\network\mgmt_express_route_circuit\lib\models\__pycache__\express_route_circuit_creation_client_enums.cpython-35.pyc' which is 265 chars long.

$ python
Python 2.7.10 (default, Jul 30 2016, 19:40:32) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 'C:\Users\itowlson\AppData\Local\Temp\pip-y1fv359h-uninstall\users\itowlson\appdata\local\continuum\anaconda3\lib\site-packages\azure\cli\command_modules\network\mgmt_express_route_circuit\lib\models\__pycache__\express_route_circuit_creation_client_enums.cpython-35.pyc'
>>> len(a)
265
>>> 

@itowlson
Copy link
Author

itowlson commented Feb 8, 2017

Oh, man. That makes sense. I'll see if I can get things to install further up the tree. Thanks.

@derekbekoe
Copy link
Member

Closing issue.
@itowlson please open another issue if you run into any further problems.
Thanks.

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