Python and PIP

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Python and PIP

Post by mightycpa » Mon Apr 05, 2021 10:23 pm

Hi,

I don't know a thing about python, but I'm being sorta forced to use it. I've downloaded the 3.7 file and extracted it into the MacroScheduler folder. Easy enough.

What I'm doing requires a particular library, which in turn requires certain packages. The instructions to install the library is a one-liner that requires pip. I've found a way to install that here: https://bootstrap.pypa.io/get-pip.py and I think that means I have to just run that script and it will create an executable for me. But I'm not sure.

Also, where do packages ordinarily go? Do I just use pip to install those too? It seems so.

Among the packages needed are requests>2.5 and six>1.9. But my first foray into the PyPI website shows me about a bazillion packages with the word requests in them, and many start with something like requests3 or requests5. Can I just pick any of those? How does this work?

Six is a little less straightforward. PyPI shows a "six 1.15.0" , and then a bunch of packages that just happen to have the word six in them, and a slew of them that don't even have that. I have no idea why they are included in the search results. It's not very intuitive to me.

Can somebody give me a little guidance?
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Python and PIP

Post by mightycpa » Sat Apr 10, 2021 6:21 pm

bump
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

User avatar
Marcus Tettmar
Site Admin
Posts: 7376
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Python and PIP

Post by Marcus Tettmar » Mon Apr 12, 2021 12:26 pm

Pip isn't going to install anything into the Macro Scheduler python install. You need to copy the library files/folders manually into the relevant folders in the Macro Scheduler folder.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Python and PIP

Post by mightycpa » Mon Apr 12, 2021 7:04 pm

Marcus, what I'm reading between the lines of your reply is that I'd need a separate python install where pip would install these things in the normal python manner. Then I copy over whatever folders I need and then put them in the Lib folder?

Would I need to install python on the same machine, or could I just copy folders from any machine with a correct install?
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

User avatar
Marcus Tettmar
Site Admin
Posts: 7376
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Python and PIP

Post by Marcus Tettmar » Wed Apr 14, 2021 3:53 pm

I guess you could do that. I would just download the actual libraries and copy in manually. Into the Macro Scheduler python install. And just not use a package manager like PIP.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Python and PIP

Post by mightycpa » Wed Apr 14, 2021 4:22 pm

I'd rather do the least. I'll try it, see if that works.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts