Code Monkey home page Code Monkey logo

Comments (4)

atech1973 avatar atech1973 commented on June 1, 2024

To add more insight to this issue, I have discovered another similar thread to mine which alerted me to check the python pip list.
Similar other thread link: #420

#######################################
When I ran pip list I can see pysnmp was installed
Package Version


pip 23.0.1
ply 3.11
pyasn1 0.4.8
pycryptodomex 3.17
pysmi 0.3.4
pysnmp 4.4.12

And py -m pip list command did not list pysnmp in the list but it gave me warning that I had an older pip installed.

Package Version


astroid 2.5.6
beautifulsoup4 4.9.3
certifi 2020.12.5
chardet 4.0.0
colorama 0.4.4
idna 2.10
isort 5.8.0
lazy-object-proxy 1.6.0
mccabe 0.6.1
pip 20.2.3
pylint 2.8.2
pytube 11.0.0
requests 2.25.1
setuptools 49.2.1
soupsieve 2.2.1
toml 0.10.2
urllib3 1.26.4
wrapt 1.12.1
WARNING: You are using pip version 20.2.3; however, version 23.0.1 is available.
You should consider upgrading via the 'C:\Users\atech1973\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip' command.

I ran this command and old pip was updated.

c:\users\atech1973\batchfiles>C:\Users\atech1973\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip
Collecting pip
Using cached pip-23.0.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.2.3
Uninstalling pip-20.2.3:
Successfully uninstalled pip-20.2.3
WARNING: The scripts pip.exe, pip3.9.exe and pip3.exe are installed in 'C:\Users\atech1973\AppData\Local\Programs\Python\Python39\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-23.0.1

After this if run command py -m pip list > I still don't see pysnmp in the list but pip list shows me pysnmp in its list
Package Version


pip 23.0.1
ply 3.11
pyasn1 0.4.8
pycryptodomex 3.17
pysmi 0.3.4
pysnmp 4.4.12

I anyone has had this experience then please if you can help me out?

from pysnmp.

atech1973 avatar atech1973 commented on June 1, 2024

Further to this problem resolution I have added my pip path to my environment path as well but still running the py -m pip list does not print the pysnmp being in the list.

If I type pip without anything else, the path is shorter then if I run pip -V command. see below.
C:\Users\atech1973\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -m pip [options]

As mentioned above, if I run pip -V command, I have pip Ver. 23.0.1 running but just noticed it's working directory is in a weird location and I am not sure if this is its working director that I should add to window path or the one above.

C:\Users\atech1973\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pip (python 3.9)

If I brows to the second long path location, I can see pysnmp diectory is in here.


Cryptodome
pip
pip-23.0.1.dist-info
ply
ply-3.11.dist-info
pyasn1
pyasn1.0.4.8.dist-info
pycryptodome-3.17.dist-info
pysmi
pysmi.0.3.4.dist-info
pysnmp
pysnmp-4.4.12.dist-info


from pysnmp.

atech1973 avatar atech1973 commented on June 1, 2024

Lastly I have added the following path to my Windows path Env. and still I get the same error when I run the program that tries to import pysnmp.

C:\Users\atech1973\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pysnmp

pysnmp error on run

from pysnmp.

lextm avatar lextm commented on June 1, 2024
  1. You are reading one of the worst sources of PySNMP documentation. Please read #429 for more details. That web page was set up by someone who has no relationship to the original author and has no intention to keep the information up-to-date or even technically correct. Unfortunately Google puts it at top of search results which shows how poor that search engine is.
  2. You will have to be a good enough Python user/developer in order to make good use of this library.

It will be rather lengthy to teach you enough Python, unless you buy great books/tutorials or just hire a consultant. So, the only tip I want to say is to learn the actual path of python.exe on your machine, and then perform all other operations with that executable. For example, use python.exe -m pip list and python.exe -m pip install to verify/install packages, then use python.exe yourscript.py to execute your test script.

A tool like VS Code + Microsoft Python extension can easily guide you on which python.exe to use, so I never use IDLE Shell or the editor you used.

from pysnmp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.