电脑安装的cuda环境记录模块
检查Nvidia版本
PS C:\Users\***> nvidia-smi
Tue Feb 14 18:09:39 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 517.48 Driver Version: 517.48 CUDA Version: 11.7 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... WDDM | 00000000:01:00.0 On | N/A |
| N/A 52C P8 10W / N/A | 622MiB / 4096MiB | 1% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
##GPU信息
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1552 C+G ...y\ShellExperienceHost.exe N/A |
| 0 N/A N/A 5512 C+G ...BHVLBFPWCTZ75KA\DeepL.exe N/A |
| 0 N/A N/A 5536 C+G ...n1h2txyewy\SearchHost.exe N/A |
| 0 N/A N/A 11336 C+G ...2txyewy\TextInputHost.exe N/A |
| 0 N/A N/A 11508 C+G ...tracted\WechatBrowser.exe N/A |
| 0 N/A N/A 13652 C+G ...oft OneDrive\OneDrive.exe N/A |
| 0 N/A N/A 15680 C+G ...ftware\RadeonSoftware.exe N/A |
| 0 N/A N/A 15964 C+G ...lPanel\SystemSettings.exe N/A |
| 0 N/A N/A 16336 C+G C:\Windows\explorer.exe N/A |
| 0 N/A N/A 18404 C+G ...ekyb3d8bbwe\YourPhone.exe N/A |
| 0 N/A N/A 18460 C+G ...ge\Application\msedge.exe N/A |
| 0 N/A N/A 21640 C+G ...erver\YourPhoneServer.exe N/A |
| 0 N/A N/A 21828 C+G ...artMenuExperienceHost.exe N/A |
| 0 N/A N/A 23024 C+G ...d\runtime\WeChatAppEx.exe N/A |
| 0 N/A N/A 23492 C+G ...587.41\msedgewebview2.exe N/A |
| 0 N/A N/A 24564 C+G ...nsoftware\AMDRSSrcExt.exe N/A |
+-----------------------------------------------------------------------------+
python开发平台
pycharm版本信息
PyCharm 2022.1.2 (Community Edition)
Build #PC-221.5787.24, built on May 31, 2022
Runtime version: 11.0.15+10-b2043.56 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1966M
Cores: 12
Non-Bundled Plugins:
com.intellij.zh (221.262)
anaconda版本
PS C:\Users\****> conda --version
conda 22.11.1
PS C:\Users\****> conda info
active environment : None
user config file : C:\Users\****\.condarc
populated config files : C:\Users\****\.condarc
conda version : 22.11.1
conda-build version : 3.21.8
python version : 3.9.12.final.0
virtual packages : __archspec=1=x86_64
__cuda=11.7=0
__win=0=0
base environment : C:\Program Files\Anaconda (writable)
conda av data dir : C:\Program Files\Anaconda\etc\conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Program Files\Anaconda\pkgs
C:\Users\****\.conda\pkgs
C:\Users\****\AppData\Local\conda\conda\pkgs
envs directories : C:\Program Files\Anaconda\envs
C:\Users\****\.conda\envs
C:\Users\****\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/22.11.1 requests/2.27.1 CPython/3.9.12 Windows/10 Windows/10.0.22621
administrator : False
netrc file : None
offline mode : False
###
nvcc -V测试,显示cuda安装成功。
(base) PS C:\Users\****> nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Jun__8_16:59:34_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.7, V11.7.99
Build cuda_11.7.r11.7/compiler.31442593_0
这里原本以为是在cmd就可以显示,原来是在Anaconda Prompt查看环境,后面跑测试代码的时候也是在此。
// 这里是CMD命令提示符显示的结果
PS C:\Users\****> conda info --env
# conda environments:
#
base C:\Program Files\Anaconda
python27 C:\Program Files\Anaconda\envs\python27
// 这里是Anaconda Prompt命令提示符显示的结果
(base) PS C:\Users\****> conda info --env
# conda environments:
#
base * C:\Program Files\Anaconda
python27 C:\Program Files\Anaconda\envs\python27
(base) PS C:\Users\****>
展示配置文件内容
PS C:\Users\****> conda config --show
add_anaconda_token: True
add_pip_as_python_dependency: True
aggressive_update_packages:
- ca-certificates
- certifi
- openssl
allow_conda_downgrades: False
allow_cycles: True
allow_non_channel_urls: False
allow_softlinks: False
allowlist_channels: []
always_copy: False
always_softlink: False
always_yes: None
anaconda_upload: None
auto_activate_base: True
auto_stack: 0
auto_update_conda: True
bld_path:
changeps1: True
channel_alias: https://conda.anaconda.org
channel_priority: flexible
channels:
- defaults
client_ssl_cert: None
client_ssl_cert_key: None
clobber: False
conda_build: {}
create_default_packages: []
croot: C:\Program Files\Anaconda\conda-bld
custom_channels:
pkgs/main: https://repo.anaconda.com
pkgs/r: https://repo.anaconda.com
pkgs/msys2: https://repo.anaconda.com
pkgs/pro: https://repo.anaconda.com
custom_multichannels:
defaults:
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/r
- https://repo.anaconda.com/pkgs/msys2
local:
debug: False
default_channels:
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/r
- https://repo.anaconda.com/pkgs/msys2
default_python: 3.9
default_threads: None
deps_modifier: not_set
dev: False
disallowed_packages: []
download_only: False
dry_run: False
enable_private_envs: False
env_prompt: ({default_env})
envs_dirs:
- C:\Program Files\Anaconda\envs
- C:\Users\****\.conda\envs
- C:\Users\****\AppData\Local\conda\conda\envs
error_upload_url: https://conda.io/conda-post/unexpected-error
execute_threads: 1
extra_safety_checks: False
fetch_threads: 5
force: False
force_32bit: False
force_reinstall: False
force_remove: False
ignore_pinned: False
json: False
local_repodata_ttl: 1
migrated_channel_aliases: []
migrated_custom_channels: {}
non_admin_enabled: True
notify_outdated_conda: True
number_channel_notices: 5
offline: False
override_channels_enabled: True
path_conflict: clobber
pinned_packages: []
pip_interop_enabled: False
pkgs_dirs:
- C:\Program Files\Anaconda\pkgs
- C:\Users\****\.conda\pkgs
- C:\Users\****\AppData\Local\conda\conda\pkgs
proxy_servers: {}
quiet: False
remote_backoff_factor: 1
remote_connect_timeout_secs: 9.15
remote_max_retries: 3
remote_read_timeout_secs: 60.0
repodata_fns:
- current_repodata.json
- repodata.json
repodata_threads: None
report_errors: None
restore_free_channel: False
rollback_enabled: True
root_prefix: C:\Program Files\Anaconda
safety_checks: warn
sat_solver: pycosat
separate_format_cache: False
shortcuts: True
show_channel_urls: None
signing_metadata_url_base: None
solver: classic
solver_ignore_timestamps: False
ssl_verify: True
subdir: win-64
subdirs:
- win-64
- noarch
target_prefix_override:
track_features: []
unsatisfiable_hints: True
unsatisfiable_hints_check_depth: 2
update_modifier: update_specs
use_index_cache: False
use_local: False
use_only_tar_bz2: False
verbosity: 0
verify_threads: 1
PS C:\Users\****> pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
Writing to C:\Users\****\AppData\Roaming\pip\pip.ini
>#PS C:\Users\****> pip install tensorflow==2.10.0
PS C:\Users\****> pip show tensorflow
Name: tensorflow
Version: 2.10.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: [email protected]
License: Apache 2.0
Location: c:\program files\anaconda\lib\site-packages
Requires: termcolor, libclang, keras-preprocessing, opt-einsum, protobuf, gast, tensorflow-io-gcs-filesystem, numpy, six, tensorflow-estimator, h5py, keras, wrapt, absl-py, packaging, grpcio, typing-extensions, astunparse, setuptools, tensorboard, google-pasta, flatbuffers
Required-by:
其他相关的模块
Name: termcolor
Version: 1.1.0
Name: libclang
Version: 14.0.6
Name: Keras-Preprocessing
Version: 1.1.2
Name: opt-einsum
Version: 3.3.0
Name: protobuf
Version: 3.19.1
Name: gast
Version: 0.4.0
Name: tensorflow-io-gcs-filesystem
Version: 0.27.0
Summary: TensorFlow IO
Name: numpy
Version: 1.24.2
Name: six
Version: 1.15.0
Name: tensorflow-estimator
Version: 2.10.0
Name: h5py
Version: 3.1.0
Name: keras
Version: 2.10.0
Name: wrapt
Version: 1.12.1
Name: absl-py
Version: 1.4.0
Name: packaging
Version: 21.3
Name: grpcio
Version: 1.42.0
Name: typing-extensions
Version: 3.7.4.3
Name: astunparse
Version: 1.6.3
Name: setuptools
Version: 61.2.0
Name: tensorboard
Version: 2.10.1
Name: google-pasta
Version: 0.2.0
Name: flatbuffers
Version: 23.1.21