Title: Issue: Installation Failure of Netmiko on Python 3.11.4 Embedded Version · Issue #623 · PythonCharmers/python-future · GitHub
Open Graph Title: Issue: Installation Failure of Netmiko on Python 3.11.4 Embedded Version · Issue #623 · PythonCharmers/python-future
X Title: Issue: Installation Failure of Netmiko on Python 3.11.4 Embedded Version · Issue #623 · PythonCharmers/python-future
Description: Overview I encountered an error while attempting to install netmiko using pip on the embedded Python version python-3.11.4-embed-amd64. Key Notes The issue seems to be with the future package, as indicated by the error traceback. The pro...
Open Graph Description: Overview I encountered an error while attempting to install netmiko using pip on the embedded Python version python-3.11.4-embed-amd64. Key Notes The issue seems to be with the future package, as i...
X Description: Overview I encountered an error while attempting to install netmiko using pip on the embedded Python version python-3.11.4-embed-amd64. Key Notes The issue seems to be with the future package, as i...
Opengraph URL: https://github.com/PythonCharmers/python-future/issues/623
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Issue: Installation Failure of Netmiko on Python 3.11.4 Embedded Version","articleBody":"## Overview\r\n\r\nI encountered an error while attempting to install `netmiko` using pip on the embedded Python version `python-3.11.4-embed-amd64`.\r\n\r\n## Key Notes\r\n\r\n* The issue seems to be with the `future` package, as indicated by the error traceback.\r\n* The problem doesn't seem to originate from `pip`, but from a subprocess during the package's metadata generation.\r\n\r\n## Reproduction Steps\r\n\r\nThe script named `python-embed-future-issue.ps1` performs the following:\r\n\r\n1. Downloads the `Python 3.11.4` embedded binaries.\r\n2. Install `pip`.\r\n3. Modify the `python311._pth` to ensure the site-packages directory is considered.\r\n4. Initiate the installation of `netmiko` using the command `python.exe -m pip install netmiko`.\r\n\r\n## Script content\r\n\r\n```powershell\r\n# Define Variables\r\n$pythonUrl = \"https://www.python.org/ftp/python/3.11.4/python-3.11.4-embed-amd64.zip\"\r\n$pythonEmbedZip = \"${PWD}\\python-3.11.4-embed-amd64.zip\"\r\n$pythonEmbedDir = \"${PWD}\\python-3.11.4-embed-amd64\"\r\n$pythonExec = \"${pythonEmbedDir}\\python.exe\"\r\n$pythonPthFilePath = \"${pythonEmbedDir}\\python311._pth\"\r\n\r\n$getPipUrl = \"https://bootstrap.pypa.io/get-pip.py\"\r\n$getPipFilePath = \"${pythonEmbedDir}\\get-pip.py\"\r\n\r\n# Cleanup existing files and paths\r\nRemove-Item -Path $pythonEmbedZip -Force -ErrorAction \"SilentlyContinue\"\r\nRemove-Item -Path $pythonEmbedDir -Force -Recurse -ErrorAction \"SilentlyContinue\"\r\n\r\n# Download Embedded Python Version\r\n(New-Object Net.WebClient).DownloadFile($pythonUrl, $pythonEmbedZip)\r\nExpand-Archive $pythonEmbedZip \r\n\r\n# Download Pip Installer Script\r\n(New-Object Net.WebClient).DownloadFile($getPipUrl, $getPipFilePath)\r\n\r\n# Modify .pth file to include site-packages\r\n$pthContent = Get-Content -Path $pythonPthFilePath\r\n$newPthContent = $pthContent -replace \"#import site\", \"import site\"\r\nSet-Content -Path $pythonPthFilePath -Value $newPthContent -Force\r\n\r\n# Initiate Pip Installation\r\n\u0026 $pythonExec \"${getPipFilePath}\"\r\n\r\n# Begin netmiko Installation\r\n\u0026 $pythonExec -m pip install netmiko\r\n```\r\n\r\nOutput from the script execution:\r\n\r\n```text\r\nCollecting pip\r\n Obtaining dependency information for pip from https://files.pythonhosted.org/packages/50/c2/e06851e8cc28dcad7c155f4753da8833ac06a5c704c109313b8d5a62968a/pip-23.2.1-py3-none-any.whl.metadata \r\n Using cached pip-23.2.1-py3-none-any.whl.metadata (4.2 kB)\r\nCollecting setuptools\r\n Obtaining dependency information for setuptools from https://files.pythonhosted.org/packages/c7/42/be1c7bbdd83e1bfb160c94b9cafd8e25efc7400346cf7ccdbdb452c467fa/setuptools-68.0.0-py3-none-any.whl.metadata\r\n Using cached setuptools-68.0.0-py3-none-any.whl.metadata (6.4 kB)\r\nCollecting wheel\r\n Obtaining dependency information for wheel from https://files.pythonhosted.org/packages/28/f5/6955d7b3a5d71ce6bac104f9cf98c1b0513ad656cdaca8ea7d579196f771/wheel-0.41.1-py3-none-any.whl.metadata\r\n Using cached wheel-0.41.1-py3-none-any.whl.metadata (2.2 kB)\r\nUsing cached pip-23.2.1-py3-none-any.whl (2.1 MB)\r\nUsing cached setuptools-68.0.0-py3-none-any.whl (804 kB)\r\nUsing cached wheel-0.41.1-py3-none-any.whl (64 kB)\r\nInstalling collected packages: wheel, setuptools, pip\r\n WARNING: The script wheel.exe is installed in 'C:\\Users\\GlennGoffin\\Git\\utils\\python3-embed-win-x64\\temp\\python-3.11.4-embed-amd64\\Scripts' which is not on PATH.\r\n Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\r\n WARNING: The scripts pip.exe, pip3.11.exe and pip3.exe are installed in 'C:\\Users\\GlennGoffin\\Git\\utils\\python3-embed-win-x64\\temp\\python-3.11.4-embed-amd64\\Scripts' which is not on PATH.\r\n Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\r\nSuccessfully installed pip-23.2.1 setuptools-68.0.0 wheel-0.41.1\r\nCollecting netmiko\r\n Using cached netmiko-4.2.0-py3-none-any.whl (213 kB)\r\nCollecting ntc-templates\u003e=2.0.0 (from netmiko)\r\n Obtaining dependency information for ntc-templates\u003e=2.0.0 from https://files.pythonhosted.org/packages/8a/64/b5d15f16ea6e5152fe1b56115b02efb87326db5b006bb907290fcdbf019b/ntc_templates-3.5.0-py3-none-any.whl.metadata\r\n Using cached ntc_templates-3.5.0-py3-none-any.whl.metadata (3.9 kB)\r\nCollecting paramiko\u003e=2.9.5 (from netmiko)\r\n Obtaining dependency information for paramiko\u003e=2.9.5 from https://files.pythonhosted.org/packages/bb/8f/3cef65d3fe76e59f320405027d594a0332e44852fef722f0ee4e81e2e7e3/paramiko-3.3.1-py3-none-any.whl.metadata\r\n Using cached paramiko-3.3.1-py3-none-any.whl.metadata (4.4 kB)\r\nCollecting pyserial\u003e=3.3 (from netmiko)\r\n Using cached pyserial-3.5-py2.py3-none-any.whl (90 kB)\r\nCollecting pyyaml\u003e=5.3 (from netmiko)\r\n Obtaining dependency information for pyyaml\u003e=5.3 from https://files.pythonhosted.org/packages/b3/34/65bb4b2d7908044963ebf614fe0fdb080773fc7030d7e39c8d3eddcd4257/PyYAML-6.0.1-cp311-cp311-win_amd64.whl.metadata\r\n Using cached PyYAML-6.0.1-cp311-cp311-win_amd64.whl.metadata (2.1 kB)\r\nCollecting scp\u003e=0.13.6 (from netmiko)\r\n Using cached scp-0.14.5-py2.py3-none-any.whl (8.7 kB)\r\nCollecting textfsm\u003e=1.1.3 (from netmiko)\r\n Using cached textfsm-1.1.3-py2.py3-none-any.whl (44 kB)\r\nCollecting bcrypt\u003e=3.2 (from paramiko\u003e=2.9.5-\u003enetmiko)\r\n Using cached bcrypt-4.0.1-cp36-abi3-win_amd64.whl (152 kB)\r\nCollecting cryptography\u003e=3.3 (from paramiko\u003e=2.9.5-\u003enetmiko)\r\n Obtaining dependency information for cryptography\u003e=3.3 from https://files.pythonhosted.org/packages/30/56/5f4eee57ccd577c261b516bfcbe17492838e2bc4e2e92ea93bbb57666fbd/cryptography-41.0.3-cp37-abi3-win_amd64.whl.metadata\r\n Using cached cryptography-41.0.3-cp37-abi3-win_amd64.whl.metadata (5.3 kB)\r\nCollecting pynacl\u003e=1.5 (from paramiko\u003e=2.9.5-\u003enetmiko)\r\n Using cached PyNaCl-1.5.0-cp36-abi3-win_amd64.whl (212 kB)\r\nCollecting six (from textfsm\u003e=1.1.3-\u003enetmiko)\r\n Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)\r\nCollecting future (from textfsm\u003e=1.1.3-\u003enetmiko)\r\n Using cached future-0.18.3.tar.gz (840 kB)\r\n Preparing metadata (setup.py) ... error\r\n error: subprocess-exited-with-error\r\n\r\n × python setup.py egg_info did not run successfully.\r\n │ exit code: 1\r\n ╰─\u003e [6 lines of output]\r\n Traceback (most recent call last):\r\n File \"\u003cstring\u003e\", line 2, in \u003cmodule\u003e\r\n File \"\u003cpip-setuptools-caller\u003e\", line 34, in \u003cmodule\u003e\r\n File \"C:\\Users\\GlennGoffin\\AppData\\Local\\Temp\\pip-install-copost0e\\future_8c061b43807c4df1aed534bfb1fad12e\\setup.py\", line 86, in \u003cmodule\u003e\r\n import src.future\r\n ModuleNotFoundError: No module named 'src'\r\n [end of output]\r\n\r\n note: This error originates from a subprocess, and is likely not a problem with pip.\r\nerror: metadata-generation-failed\r\n\r\n× Encountered error while generating package metadata.\r\n╰─\u003e See above for output.\r\n\r\nnote: This is an issue with the package mentioned above, not pip.\r\nhint: See above for details.\r\n```\r\n\r\n\r\n\r\n## Attempts to fix\r\n\r\n### Update PIP and Setup Tools\r\n\r\n```powershell\r\npython -m ensurepip --upgrade\r\npython -m pip install --upgrade pip\r\npython -m pip install --upgrade setuptools\r\n```\r\n\r\n## References\r\n\r\n* https://kb.paessler.com/en/topic/91446-error-installing-python-module-future\r\n* https://github.com/ktbyers/netmiko/issues/3269","author":{"url":"https://github.com/glego","@type":"Person","name":"glego"},"datePublished":"2023-08-15T12:02:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/623/python-future/issues/623"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:eccc064a-a290-6dca-6eb5-07107ab12063 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA8A:3E2690:1E903:2899D:696E4562 |
| html-safe-nonce | b130b4c122ab185df49628f14d1cb30a67417137103d379c850f58044e4a5c1e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQThBOjNFMjY5MDoxRTkwMzoyODk5RDo2OTZFNDU2MiIsInZpc2l0b3JfaWQiOiI0MzM1ODgzMDM3NDI2MjA2MDUwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 845e7b62d197d45e6971c96c511ae4c2e9bfe3d6377550d4823441245d23b713 |
| hovercard-subject-tag | issue:1851323409 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PythonCharmers/python-future/623/issue_layout |
| twitter:image | https://opengraph.githubassets.com/641d3e8283e08f20b078c2a7d06ae2071628ee4a94f1a9599ef7eae634ae8b33/PythonCharmers/python-future/issues/623 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/641d3e8283e08f20b078c2a7d06ae2071628ee4a94f1a9599ef7eae634ae8b33/PythonCharmers/python-future/issues/623 |
| og:image:alt | Overview I encountered an error while attempting to install netmiko using pip on the embedded Python version python-3.11.4-embed-amd64. Key Notes The issue seems to be with the future package, as i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | glego |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d96554e55b469c47dbcd31f74dc86278872b170531e84c6ce7f3389673e01d1 |
| turbo-cache-control | no-preview |
| go-import | github.com/PythonCharmers/python-future git https://github.com/PythonCharmers/python-future.git |
| octolytics-dimension-user_id | 3365815 |
| octolytics-dimension-user_login | PythonCharmers |
| octolytics-dimension-repository_id | 11403699 |
| octolytics-dimension-repository_nwo | PythonCharmers/python-future |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 11403699 |
| octolytics-dimension-repository_network_root_nwo | PythonCharmers/python-future |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ef576694863a4c791d0a5cc9d2b84384d4414bcd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width