4 Replies Latest reply on Jul 9, 2015 9:45 AM by Toby Erkson

    Need help installing the two final Python packages.

    Toby Erkson

      This part from the Install Guide:

      The final two packages, requests and requests_ntlm, are best installed by opening a new command prompt and running the following commands:
      pip install requests

      pip install requests_ntlm

      Our Server is a VM in a secure area so when I entered the above command at the command prompt it looks like it didn't work:

       

      However, I believe I have the requests installed.  Here's what I did next...

      I went to Installation — Requests 2.7.0 documentation and downloaded the zipball.

      In Firefox highlight the URL and right click to get the menu (1), select Save Link As... and (2) Save File:

      Unzipped it then opened a cmd prompt, went to the unzipped folder (cd at the command prompt) and entered the command

      python setup.py install
      
      
      

      The screen quickly filled with activity and then completed with no visible errors nor warnings.  Thus the assumption it worked.

       

      Now, the requests_ntlm is next and that one isn't as obvious to me.  I was programming before github ever existed and have never had a need for it so I don't know how it works.  Same goes for Python.  So I need to be walked through as a total newb

       

      From the pip.log:

      C:\Python27\Scripts\pip run on 07/08/15 14:09:44

      Downloading/unpacking requests-ntlm

        Getting page https://pypi.python.org/simple/requests_ntlm/

        Could not fetch URL https://pypi.python.org/simple/requests_ntlm/: connection error: ('Cannot connect to proxy.', error(10060, 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

        Will skip URL https://pypi.python.org/simple/requests_ntlm/ when looking for download links for requests-ntlm

        Getting page https://pypi.python.org/simple/

        Could not fetch URL https://pypi.python.org/simple/: connection error: ('Cannot connect to proxy.', error(10060, 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

        Will skip URL https://pypi.python.org/simple/ when looking for download links for requests-ntlm

        Cannot fetch index base URL https://pypi.python.org/simple/

        URLs to search for versions for requests-ntlm:

        * https://pypi.python.org/simple/requests_ntlm/

        Getting page https://pypi.python.org/simple/requests_ntlm/

        Could not fetch URL https://pypi.python.org/simple/requests_ntlm/: connection error: ('Cannot connect to proxy.', error(10060, 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

        Will skip URL https://pypi.python.org/simple/requests_ntlm/ when looking for download links for requests-ntlm

        Could not find any downloads that satisfy the requirement requests-ntlm

      Cleaning up...

        Removing temporary dir c:\users\terkson\appdata\local\temp\2\pip_build_terkson...

      No distributions at all found for requests-ntlm

      Exception information:

      Traceback (most recent call last):

        File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main

          status = self.run(options, args)

        File "C:\Python27\lib\site-packages\pip\commands\install.py", line 278, in run

          requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)

        File "C:\Python27\lib\site-packages\pip\req.py", line 1177, in prepare_files

          url = finder.find_requirement(req_to_install, upgrade=self.upgrade)

        File "C:\Python27\lib\site-packages\pip\index.py", line 277, in find_requirement

          raise DistributionNotFound('No distributions at all found for %s' % req)

      DistributionNotFound: No distributions at all found for requests-ntlm

        • 1. Re: Need help installing the two final Python packages.
          Matt Coles

          Nice find, Toby. I wasn't familiar with the process of an offline Python package either, but after a bit of searching, it looks pretty painless. It's a three-step process:

           

          1. On an Internet-enabled machine, download the package to a folder of your choosing. This functions as basically an offline package repository:

          pip install --download c:\mypythonpackages requests_ntlm
          

           

          2. Copy the folder  to your offline machine (I'm assuming here that it's copied to the same path).

           

          3. On your offline machine, install the package from the newly copied folder:

          pip install --no-index --find-links file:c:\mypythonpackages requests_ntlm
          

           

          It seems to be working on my side--let me know if it works for you!

          • 2. Re: Need help installing the two final Python packages.
            Toby Erkson

            No joy

            The log is complaining about a timeout issue (I think it waits about 15 seconds, gets no response, and errors).  Looks like I'll have to download it at home, put it on a thumb-drive, and then install it when I get back to work.  If it's not a huge file you can zip it and email it to me if you have the time (no worries if you can't ).

            • 3. Re: Need help installing the two final Python packages.
              Matt Coles

              Was that command run on the secured VM? It would need to be run on a separate machine that can connect to https://pypi.python.org. So if your employer is blocking internet traffic to that site, it definitely won't work.

               

              Anyway, to save you some grief, I'm attaching the files in a zip.

              1 of 1 people found this helpful
              • 4. Re: Need help installing the two final Python packages.
                Toby Erkson

                Thanks Matt.  I unzipped the file into its own folder (D:\temp\requests_ntlm) and then ran the install command:

                pip install --no-index --find-links file:D:\temp\requests_ntlm requests_ntlm

                and it looks like it worked:

                 

                I tried the suggested cmd download on the VM and my laptop to no avail.  Both machines can connect to the Python site you gave (pypi.python.ord).  Weird.

                 

                Anyway, thanks for the assist.  Now to configure the viz alerts...