ARMmbed / ARMmbed/mbed-cli-windows-installer
Traceback when upgrading mbed-cli independent of the whole installer package
- Dominant language
- NSIS
- Stars
- 37
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
I've installed mbed CLI using mbed-cli-windows installer.
I got an email that mbed CLI version 1.1.1 was available so I ran ```pip install -U mbed-cli``` and I got:
```
C:\dev\mbed-os>pip install -U mbed-cli
Collecting mbed-cli
Downloading mbed-cli-1.1.1.zip (50kB)
100% |################################| 51kB 18kB/s
Installing collected packages: mbed-cli
Found existing installation: mbed-cli 1.0.0
Uninstalling mbed-cli-1.0.0:
Successfully uninstalled mbed-cli-1.0.0
Running setup.py install for mbed-cli ... done
Exception:
Traceback (most recent call last):
File "c:\python27\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\python27\lib\site-packages\pip\commands\install.py", line 350, in run
isolated=options.isolated_mode,
File "c:\python27\lib\site-packages\pip\commands\install.py", line 436, in get_lib_location_guesses
scheme = distutils_scheme('', *args, **kwargs)
File "c:\python27\lib\site-packages\pip\locations.py", line 140, in distutils_scheme
d = Distribution(dist_args)
File "c:\python27\lib\site-packages\setuptools\dist.py", line 316, in __init__
for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 730, in iter_entry_points
entries = dist.get_entry_map(group)
File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2639, in get_entry_map
self._get_metadata('entry_points.txt'), self
File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2369, in parse_map
for group, lines in data:
File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2967, in split_sections
for line in yield_lines(s):
File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2235, in yield_lines
for ss in strs:
File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2564, in _get_metadata
if self.has_metadata(name):
File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 1462, in has_metadata
return self.egg_info and self._has(self._fn(self.egg_info, name))
File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 1822, in _has
return zip_path in self.zipinfo or zip_path in self._index()
File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 1702, in zipinfo
return self._zip_manifests.load(self.loader.archive)
File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 1642, in load
mtime = os.stat(path).st_mtime
WindowsError: [Error 2] The system cannot find the file specified: 'c:\\python27\\lib\\site-packages\\mbed_cli-1.0.0-py2.7.egg
'
```
This seems to be caused by the installer using https://github.com/ARMmbed/mbed-cli-windows-installer/blob/master/source/cliInstall.nsi#L150 which is not the same as the site-package in my installed python directory where pip expects the package to have previously been downloaded to.
Contributor guide
No contributing guide indexed for this repository
Research direction
Inspect source/cliInstall.nsi around line 150 and reproduce the reported `pip install -U mbed-cli` command on Windows. Compare the installer-created package location with the path pip expects, and consider the issue resolved when upgrading from the installer-installed 1.0.0 package completes without the traceback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100