Open Smit-create opened 1 year ago
Installing quantecon using piplite (%pip install quantecon) fails with the following error:
quantecon
piplite
%pip install quantecon
```console --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[22], line 1 ----> 1 await __import__("piplite").install(**{'requirements': ['quantecon']}) File /lib/python3.11/site-packages/piplite/piplite.py:103, in _install(requirements, keep_going, deps, credentials, pre) 101 """Invoke micropip.install with a patch to get data from local indexes""" 102 with patch("micropip._micropip._get_pypi_json", _get_pypi_json): --> 103 return await _micropip.install( 104 requirements=requirements, 105 keep_going=keep_going, 106 deps=deps, 107 credentials=credentials, 108 pre=pre, 109 ) File /lib/python3.11/site-packages/micropip/_micropip.py:576, in install(requirements, keep_going, deps, credentials, pre) 566 wheel_base = Path(getsitepackages()[0]) 568 transaction = Transaction( 569 ctx=ctx, 570 ctx_extras=[], (...) 574 fetch_kwargs=fetch_kwargs, 575 ) --> 576 await transaction.gather_requirements(requirements) 578 if transaction.failed: 579 failed_requirements = ", ".join([f"'{req}'" for req in transaction.failed]) File /lib/python3.11/site-packages/micropip/_micropip.py:342, in Transaction.gather_requirements(self, requirements) 339 for requirement in requirements: 340 requirement_promises.append(self.add_requirement(requirement)) --> 342 await gather(*requirement_promises) File /lib/python3.11/site-packages/micropip/_micropip.py:349, in Transaction.add_requirement(self, req) 346 return await self.add_requirement_inner(req) 348 if not urlparse(req).path.endswith(".whl"): --> 349 return await self.add_requirement_inner(Requirement(req)) 351 # custom download location 352 wheel = WheelInfo.from_url(req) File /lib/python3.11/site-packages/micropip/_micropip.py:457, in Transaction.add_requirement_inner(self, req) 452 if self.check_version_satisfied(req): 453 # Maybe while we were downloading pypi_json some other branch 454 # installed the wheel? 455 return --> 457 await self.add_wheel(wheel, req.extras) File /lib/python3.11/site-packages/micropip/_micropip.py:472, in Transaction.add_wheel(self, wheel, extras) 470 await wheel.download(self.fetch_kwargs) 471 if self.deps: --> 472 await self.gather_requirements(wheel.requires(extras)) 474 self.wheels.append(wheel) File /lib/python3.11/site-packages/micropip/_micropip.py:342, in Transaction.gather_requirements(self, requirements) 339 for requirement in requirements: 340 requirement_promises.append(self.add_requirement(requirement)) --> 342 await gather(*requirement_promises) File /lib/python3.11/site-packages/micropip/_micropip.py:346, in Transaction.add_requirement(self, req) 344 async def add_requirement(self, req: str | Requirement) -> None: 345 if isinstance(req, Requirement): --> 346 return await self.add_requirement_inner(req) 348 if not urlparse(req).path.endswith(".whl"): 349 return await self.add_requirement_inner(Requirement(req)) File /lib/python3.11/site-packages/micropip/_micropip.py:444, in Transaction.add_requirement_inner(self, req) 441 metadata = await _get_pypi_json(req.name, self.fetch_kwargs) 443 try: --> 444 wheel = find_wheel(metadata, req) 445 except ValueError: 446 self.failed.append(req) File /lib/python3.11/site-packages/micropip/_micropip.py:312, in find_wheel(metadata, req) 309 if best_wheel is not None: 310 return wheel --> 312 raise ValueError( 313 f"Can't find a pure Python 3 wheel for '{req}'.\n" 314 f"See: {FAQ_URLS['cant_find_wheel']}\n" 315 "You can use `micropip.install(..., keep_going=True)`" 316 "to get a list of all packages with missing wheels." 317 ) ValueError: Can't find a pure Python 3 wheel for 'numba>=0.49.0'. See: https://pyodide.org/en/stable/usage/faq.html#micropip-can-t-find-a-pure-python-wheel You can use `micropip.install(..., keep_going=True)`to get a list of all packages with missing wheels. ```
eigen_II.md
heavy_tails.md
inequality.md
input_output.md
markov_chains_II.md
markov_chains_I.md
networks.md
Issue Description [Technical Issue]
Installing
quantecon
usingpiplite
(%pip install quantecon
) fails with the following error:Error traceback
```console --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[22], line 1 ----> 1 await __import__("piplite").install(**{'requirements': ['quantecon']}) File /lib/python3.11/site-packages/piplite/piplite.py:103, in _install(requirements, keep_going, deps, credentials, pre) 101 """Invoke micropip.install with a patch to get data from local indexes""" 102 with patch("micropip._micropip._get_pypi_json", _get_pypi_json): --> 103 return await _micropip.install( 104 requirements=requirements, 105 keep_going=keep_going, 106 deps=deps, 107 credentials=credentials, 108 pre=pre, 109 ) File /lib/python3.11/site-packages/micropip/_micropip.py:576, in install(requirements, keep_going, deps, credentials, pre) 566 wheel_base = Path(getsitepackages()[0]) 568 transaction = Transaction( 569 ctx=ctx, 570 ctx_extras=[], (...) 574 fetch_kwargs=fetch_kwargs, 575 ) --> 576 await transaction.gather_requirements(requirements) 578 if transaction.failed: 579 failed_requirements = ", ".join([f"'{req}'" for req in transaction.failed]) File /lib/python3.11/site-packages/micropip/_micropip.py:342, in Transaction.gather_requirements(self, requirements) 339 for requirement in requirements: 340 requirement_promises.append(self.add_requirement(requirement)) --> 342 await gather(*requirement_promises) File /lib/python3.11/site-packages/micropip/_micropip.py:349, in Transaction.add_requirement(self, req) 346 return await self.add_requirement_inner(req) 348 if not urlparse(req).path.endswith(".whl"): --> 349 return await self.add_requirement_inner(Requirement(req)) 351 # custom download location 352 wheel = WheelInfo.from_url(req) File /lib/python3.11/site-packages/micropip/_micropip.py:457, in Transaction.add_requirement_inner(self, req) 452 if self.check_version_satisfied(req): 453 # Maybe while we were downloading pypi_json some other branch 454 # installed the wheel? 455 return --> 457 await self.add_wheel(wheel, req.extras) File /lib/python3.11/site-packages/micropip/_micropip.py:472, in Transaction.add_wheel(self, wheel, extras) 470 await wheel.download(self.fetch_kwargs) 471 if self.deps: --> 472 await self.gather_requirements(wheel.requires(extras)) 474 self.wheels.append(wheel) File /lib/python3.11/site-packages/micropip/_micropip.py:342, in Transaction.gather_requirements(self, requirements) 339 for requirement in requirements: 340 requirement_promises.append(self.add_requirement(requirement)) --> 342 await gather(*requirement_promises) File /lib/python3.11/site-packages/micropip/_micropip.py:346, in Transaction.add_requirement(self, req) 344 async def add_requirement(self, req: str | Requirement) -> None: 345 if isinstance(req, Requirement): --> 346 return await self.add_requirement_inner(req) 348 if not urlparse(req).path.endswith(".whl"): 349 return await self.add_requirement_inner(Requirement(req)) File /lib/python3.11/site-packages/micropip/_micropip.py:444, in Transaction.add_requirement_inner(self, req) 441 metadata = await _get_pypi_json(req.name, self.fetch_kwargs) 443 try: --> 444 wheel = find_wheel(metadata, req) 445 except ValueError: 446 self.failed.append(req) File /lib/python3.11/site-packages/micropip/_micropip.py:312, in find_wheel(metadata, req) 309 if best_wheel is not None: 310 return wheel --> 312 raise ValueError( 313 f"Can't find a pure Python 3 wheel for '{req}'.\n" 314 f"See: {FAQ_URLS['cant_find_wheel']}\n" 315 "You can use `micropip.install(..., keep_going=True)`" 316 "to get a list of all packages with missing wheels." 317 ) ValueError: Can't find a pure Python 3 wheel for 'numba>=0.49.0'. See: https://pyodide.org/en/stable/usage/faq.html#micropip-can-t-find-a-pure-python-wheel You can use `micropip.install(..., keep_going=True)`to get a list of all packages with missing wheels. ```
Suggested Solution
Lectures affected by this issue ( https://github.com/QuantEcon/lecture-python-intro)
eigen_II.md
heavy_tails.md
inequality.md
input_output.md
markov_chains_II.md
markov_chains_I.md
networks.md