The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Python
 Failed to install packages
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1205 Posts

Posted - 07/21/2021 :  06:34:22 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2021b (64-bit) SR2 9.8.5.212
Windows 10 21H1 x64

Greetings!

I couldn't install the following packages using Tools | Python Packages | Install:
  • glob

  • fnmatch


How do I fix this?

---
Andrey

Edited by - AKazak on 07/21/2021 06:36:40 AM

AKazak

Russia
1205 Posts

Posted - 07/21/2021 :  06:41:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
ERROR: Could not find a version that satisfies the requirement glob (from versions: none)
ERROR: No matching distribution found for glob
Press any key to continue . . .


---
Andrey
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 07/21/2021 :  4:58:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
these are built-in, I tried both:


from glob import glob

mydir = "C:/tmp/"

file_list = glob(mydir + "*.opju")
print('file_list {}'.format(file_list))


and


import os
from fnmatch import fnmatch

mydir = "C:/tmp"
file_list = [file for file in os.listdir(mydir) if fnmatch(file, '*.opju')]

print('file_list {}'.format(file_list))



No need to install.

CP
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 07/21/2021 :  10:55:45 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by cpyang

these are built-in, I tried both:


from glob import glob

mydir = "C:/tmp/"

file_list = glob(mydir + "*.opju")
print('file_list {}'.format(file_list))


and


import os
from fnmatch import fnmatch

mydir = "C:/tmp"
file_list = [file for file in os.listdir(mydir) if fnmatch(file, '*.opju')]

print('file_list {}'.format(file_list))



No need to install.

CP




Dear CP,

OK, got it.
It would be great to have Origin reporting that these are already installed.

---
Andrey

Edited by - AKazak on 07/27/2021 5:00:00 PM
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 07/27/2021 :  5:00:09 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
By the way, what does this option do?



---
Andrey
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000