Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
11f827c5
Commit
11f827c5
authored
Jul 08, 2024
by
w-e-w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use pip freeze --all to get packages
parent
7d7f7f4b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
modules/sysinfo.py
modules/sysinfo.py
+14
-2
No files found.
modules/sysinfo.py
View file @
11f827c5
...
...
@@ -4,7 +4,6 @@ import sys
import
platform
import
hashlib
import
pkg_resources
import
re
import
launch
...
...
@@ -88,6 +87,19 @@ def get_ram_info():
return
str
(
e
)
def
get_packages
():
try
:
import
subprocess
return
subprocess
.
check_output
([
sys
.
executable
,
'-m'
,
'pip'
,
'freeze'
,
'--all'
])
.
decode
(
"utf8"
)
.
splitlines
()
except
Exception
as
pip_error
:
try
:
import
importlib.metadata
packages
=
importlib
.
metadata
.
distributions
()
return
sorted
([
f
"{package.metadata['Name']}=={package.version}"
for
package
in
packages
])
except
Exception
as
e2
:
return
{
'error pip'
:
pip_error
,
'error importlib'
:
str
(
e2
)}
def
get_dict
():
res
=
{
"Platform"
:
platform
.
platform
(),
...
...
@@ -108,7 +120,7 @@ def get_dict():
"Environment"
:
get_environment
(),
"Config"
:
get_config
(),
"Startup"
:
timer
.
startup_record
,
"Packages"
:
sorted
([
f
"{pkg.key}=={pkg.version}"
for
pkg
in
pkg_resources
.
working_set
]
),
"Packages"
:
get_packages
(
),
}
return
res
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment