Open gagan-aml opened 7 years ago
@gagan-aml This is a late add... but I had the same issue and worked around it, so I'm documenting here in case others have the issue.
I believe the issue comes from the number of characters in the path and pip copying files to be deleted to Temp. To get around this issue, I manually removed these two folders and all their contents:
%LOCALAPPDATA%\amlworkbench\python\lib\site-packages\azure\mgmt\compute\
%LOCALAPPDATA%\amlworkbench\python\lib\site-packages\azure_mgmt_compute-2.1.0.dist-info\
Then pip doesn't see this as installed and will allow you to upgrade.
If you have long paths enabled in Windows 10 it might not be an issue. I didn't try that route.
Installation fails Vienna Build: 0.1.1706.14032 OS: Windows 10 Python 3.5
C:\WINDOWS\system32>pip install azure-cli-ml --upgrade Collecting azure-cli-ml Using cached azure_cli_ml-0.1.0a12-py2.py3-none-any.whl Requirement already up-to-date: adal>=0.4.5 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-ml) Requirement already up-to-date: azure-mgmt-storage>=1.0.0rc1 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-ml) Collecting azure-mgmt-compute>=1.0.0rc1 (from azure-cli-ml) Using cached azure_mgmt_compute-1.0.0-py2.py3-none-any.whl Collecting future (from azure-cli-ml) Requirement already up-to-date: azure-mgmt-containerregistry>=0.2.0 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-ml) Requirement already up-to-date: docker>=2.2.1 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-ml) Collecting kubernetes>=1.0.0 (from azure-cli-ml) Using cached kubernetes-2.0.0-py2.py3-none-any.whl Requirement already up-to-date: azure-graphrbac>=0.30.0rc6 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-ml) Requirement already up-to-date: pyyaml in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-ml) Collecting azure-mgmt-resource>=0.30.2 (from azure-cli-ml) Using cached azure_mgmt_resource-1.1.0-py2.py3-none-any.whl Requirement already up-to-date: tabulate>=0.7.7 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-ml) Requirement already up-to-date: azure-storage>=0.33 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-ml) Requirement already up-to-date: scp in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-ml) Requirement already up-to-date: azure-cli-core in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-ml) Requirement already up-to-date: paramiko in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-ml) Requirement already up-to-date: cryptography>=1.1.0 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from adal>=0.4.5->azure-cli-ml) Requirement already up-to-date: python-dateutil>=2.1.0 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from adal>=0.4.5->azure-cli-ml) Requirement already up-to-date: requests>=2.0.0 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from adal>=0.4.5->azure-cli-ml) Requirement already up-to-date: PyJWT>=1.0.0 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from adal>=0.4.5->azure-cli-ml) Requirement already up-to-date: azure-common~=1.1.5 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-mgmt-storage>=1.0.0rc1->azure-cli-ml) Requirement already up-to-date: msrestazure~=0.4.7 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-mgmt-storage>=1.0.0rc1->azure-cli-ml) Requirement already up-to-date: azure-mgmt-nspkg>=2.0.0 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-mgmt-storage>=1.0.0rc1->azure-cli-ml) Requirement already up-to-date: six>=1.4.0 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from docker>=2.2.1->azure-cli-ml) Requirement already up-to-date: websocket-client>=0.32.0 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from docker>=2.2.1->azure-cli-ml) Requirement already up-to-date: docker-pycreds>=0.2.1 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from docker>=2.2.1->azure-cli-ml) Collecting setuptools (from kubernetes>=1.0.0->azure-cli-ml) Using cached setuptools-36.0.1-py2.py3-none-any.whl Collecting oauth2client (from kubernetes>=1.0.0->azure-cli-ml) Using cached oauth2client-4.1.1-py2.py3-none-any.whl Requirement already up-to-date: certifi in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from kubernetes>=1.0.0->azure-cli-ml) Collecting ipaddress (from kubernetes>=1.0.0->azure-cli-ml) Requirement already up-to-date: urllib3!=1.21 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from kubernetes>=1.0.0->azure-cli-ml) Requirement already up-to-date: azure-nspkg>=2.0.0 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-graphrbac>=0.30.0rc6->azure-cli-ml) Requirement already up-to-date: jmespath in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-core->azure-cli-ml) Requirement already up-to-date: azure-cli-nspkg>=2.0.0 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-core->azure-cli-ml) Requirement already up-to-date: msrest>=0.4.4 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-core->azure-cli-ml) Requirement already up-to-date: argcomplete>=1.8.0 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-core->azure-cli-ml) Requirement already up-to-date: pip in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-core->azure-cli-ml) Requirement already up-to-date: humanfriendly in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-core->azure-cli-ml) Collecting colorama (from azure-cli-core->azure-cli-ml) Using cached colorama-0.3.9-py2.py3-none-any.whl Requirement already up-to-date: applicationinsights in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-core->azure-cli-ml) Requirement already up-to-date: pygments in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-core->azure-cli-ml) Requirement already up-to-date: pyopenssl>=16.2 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from azure-cli-core->azure-cli-ml) Requirement already up-to-date: bcrypt>=3.1.3 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from paramiko->azure-cli-ml) Requirement already up-to-date: pynacl>=1.0.1 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from paramiko->azure-cli-ml) Requirement already up-to-date: pyasn1>=0.1.7 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from paramiko->azure-cli-ml) Requirement already up-to-date: idna>=2.1 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from cryptography>=1.1.0->adal>=0.4.5->azure-cli-ml) Requirement already up-to-date: asn1crypto>=0.21.0 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from cryptography>=1.1.0->adal>=0.4.5->azure-cli-ml) Requirement already up-to-date: cffi>=1.7 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from cryptography>=1.1.0->adal>=0.4.5->azure-cli-ml) Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from requests>=2.0.0->adal>=0.4.5->azure-cli-ml) Requirement already up-to-date: keyring>=5.6 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from msrestazure~=0.4.7->azure-mgmt-storage>=1.0.0rc1->azure-cli-ml) Collecting httplib2>=0.9.1 (from oauth2client->kubernetes>=1.0.0->azure-cli-ml) Collecting pyasn1-modules>=0.0.5 (from oauth2client->kubernetes>=1.0.0->azure-cli-ml) Using cached pyasn1_modules-0.0.9-py2.py3-none-any.whl Collecting rsa>=3.1.4 (from oauth2client->kubernetes>=1.0.0->azure-cli-ml) Using cached rsa-3.4.2-py2.py3-none-any.whl Requirement already up-to-date: requests-oauthlib>=0.5.0 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from msrest>=0.4.4->azure-cli-core->azure-cli-ml) Requirement already up-to-date: isodate>=0.5.4 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from msrest>=0.4.4->azure-cli-core->azure-cli-ml) Requirement already up-to-date: pycparser in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from cffi>=1.7->cryptography>=1.1.0->adal>=0.4.5->azure-cli-ml) Requirement already up-to-date: pywin32-ctypes==0.0.1; sys_platform == "win32" in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from keyring>=5.6->msrestazure~=0.4.7->azure-mgmt-storage>=1.0.0rc1->azure-cli-ml) Requirement already up-to-date: oauthlib>=0.6.2 in c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages (from requests-oauthlib>=0.5.0->msrest>=0.4.4->azure-cli-core->azure-cli-ml) Installing collected packages: azure-mgmt-compute, future, setuptools, httplib2, pyasn1-modules, rsa, oauth2client, ipaddress, kubernetes, azure-mgmt-resource, azure-cli-ml, colorama Found existing installation: azure-mgmt-compute 1.0.0rc1 Uninstalling azure-mgmt-compute-1.0.0rc1: Exception: Traceback (most recent call last): File "c:\users\gaganba\appdata\local\programs\python\python35\lib\shutil.py", line 538, in move os.rename(src, real_dst) FileNotFoundError: [WinError 3] The system cannot find the path specified: 'c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages\azure\mgmt\compute\compute\v2016_04_30_preview\models\pycache\virtual_machine_scale_set_instance_view_statuses_summary.cpython-35.pyc' -> 'C:\Users\gaganba\AppData\Local\Temp\pip-xr8ktucx-uninstall\users\gaganba\appdata\local\programs\python\python35\lib\site-packages\azure\mgmt\compute\compute\v2016_04_30_preview\models\pycache\virtual_machine_scale_set_instance_view_statuses_summary.cpython-35.pyc'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages\pip\basecommand.py", line 215, in main status = self.run(options, args) File "c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages\pip\commands\install.py", line 342, in run prefix=options.prefix_path, File "c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages\pip\req\req_set.py", line 778, in install requirement.uninstall(auto_confirm=True) File "c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages\pip\req\req_install.py", line 754, in uninstall paths_to_remove.remove(auto_confirm) File "c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages\pip\req\req_uninstall.py", line 115, in remove renames(path, new_path) File "c:\users\gaganba\appdata\local\programs\python\python35\lib\site-packages\pip\utils__init__.py", line 267, in renames shutil.move(old, new) File "c:\users\gaganba\appdata\local\programs\python\python35\lib\shutil.py", line 552, in move copy_function(src, real_dst) File "c:\users\gaganba\appdata\local\programs\python\python35\lib\shutil.py", line 251, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "c:\users\gaganba\appdata\local\programs\python\python35\lib\shutil.py", line 115, in copyfile with open(dst, 'wb') as fdst: FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\gaganba\AppData\Local\Temp\pip-xr8ktucx-uninstall\users\gaganba\appdata\local\programs\python\python35\lib\site-packages\azure\mgmt\compute\compute\v2016_04_30_preview\models\pycache\virtual_machine_scale_set_instance_view_statuses_summary.cpython-35.pyc'