ArcGIS Pro 克隆clone python环境报错问题处理方法

ArcGIS Pro 克隆clone python环境报错问题处理方法

(一)安装arcpro和深度学习安装包

首先安装arcgis pro桌面版和深度学习安装包后

然后克隆默认 Python 环境 arcgispro-py3

接下来,安装以下 Python 软件包:Tensorflow、fast.ai、Keras、Pytorch、Scikit-image、Pillow 和 Libtiff。

切记要安装以下安装步骤中指示的这些软件包的特定版本。

工具仅适用于这些特定版本。

安装软件包后,可以交换 ArcGIS Pro 环境并使用工具

(二)克隆clone python环境报错问题处理方法

(方法一)使用管理员身份运行arcgis pro后再clone环境

并且不要打开任何工程,或新建工程。启动后直接在包管理器中创建新环境即可

(方法二)直接复制原来的目录到另一个路径,并将其改名为arcgispro-py3-clone

C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3

copy拷贝到

D:\arcgispro_ai\arcgispro-py3-clone

然后重新打开arcpro中包管理器/环境管理器/添加现在环境

D:\arcgispro_ai\arcgispro-py3-clone

激活后就可以使用了

(方法三)克隆后的环境少哪个文件,给他添加哪个文件

网络的原因引起的;

解决方案:

1、网络网卡禁用后、再启用方法

2、更换网络在从新尝试;

3、换成手机热点在从新尝试。

4、上述错误的主要是因为需要从这个链接,clone下载包程序,

然后进行配置环境:https://conda.anaconda.org/esri/win-64

解决办法:手动下载对应错误链接,然后用下面的conda链接进行安装

最终建议:更新手机热点;亲测有用。

例:

#conda install ***.tar.bz2

#比如安装arcgis-1.5.3模块

#conda install arcgis-1.5.3-py36h39e3cac_1.tar.bz2

python 复制代码
activate arcgispro-py3-clone
conda install tensorflow-gpu=1.14.0
conda install keras-gpu=2.2.4
conda install scikit-image=0.15.0
conda install Pillow=6.1.0
conda install fastai=1.0.54
conda install pytorch=1.1.0
conda install libtiff=4.0.10 --no-deps
proswap arcgispro-py3-clone

(方法四) cmd手动命令行方式克隆环境

以管理员身份运行cmd命令行后执行以下命令

conda create --name arcgispro-py3-clone --clone arcgispro-py3

#arcpro2.5版本安装

python 复制代码
activate arcgispro-py3-clone
conda install tensorflow-gpu=1.14.0
conda install keras-gpu=2.2.4
conda install scikit-image=0.15.0
conda install Pillow=6.1.0
conda install fastai=1.0.54
conda install pytorch=1.1.0
conda install libtiff=4.0.10 --no-deps
proswap arcgispro-py3-clone

#arcpro3.0.2版本安装(python3.9.11)

python 复制代码
conda install lyft-dataset-sdk
conda install jupyter
conda install jupyter_core==4.6.3
conda install tensorflow==2.7.0        #cpu版本
conda install tensorflow-gpu=2.7.0     #gpu版本
conda install numba==0.55.1
conda install numpy==1.20.1
conda install networkx==2.2
conda install pytorch==1.8.2
conda install matplotlib==3.4.3
conda install setuptools==60.10.0
conda install opencv==4.5.2
conda install keras==2.7.0
conda install keras-gpu==2.7.0 
conda install libtiff==4.3.0
conda install libpng==1.6.37
conda install fastai==1.0.63
conda install pillow==9.1.0
conda install scikit-image==0.17.2
conda install scikit-learn==1.0.2
conda install xarray==0.20.1 
conda install gdal==3.4.0

在系统变量path中添加的目录

目录C:\Program Files\ArcGIS\Pro\bin\Python\Scripts

proenv.bat 以管理员身份运行:启用为激活后的当前环境cmd命令行模式

activate.bat 为激活命令

deactivate.bat 为取消激活命令

propy.bat 启动python命令行模式

proswap.bat 交换环境

安装arcpro3.0.2的AI使用环境

clone arcgispro-py3

激活环境

conda activate C:\Users\hsg\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone

conda deactivate

安装tensorflow

python 复制代码
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple lyft-dataset-sdk
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyter
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numba0.48.0
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy1.20.0
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple networkx==2.2

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow

arcgispro3.0.2深度学习安装后python环境组件版本情况列表

python 复制代码
(d:\arcgispro_ai\arcgispro-py3-clone) PS G:\app2024\MyProject深度学习AI项目\web_esri> conda list
# packages in environment at d:\arcgispro_ai\arcgispro-py3-clone:
#
# Name                    Version                   Build  Channel
_py-xgboost-mutex         2.0                       cpu_0  
_tflow_select             2.7.0                       gpu    esri
abseil-cpp                20210324.2           hd77b12b_0  
absl-py                   0.15.0             pyhd3eb1b0_0  
addict                    2.4.0                    py39_1    esri
aiohttp                   3.8.1            py39h2bbff1b_1  
aiosignal                 1.2.0              pyhd3eb1b0_0  
alembic                   1.6.4              pyhd3eb1b0_0  
appdirs                   1.4.4              pyhd3eb1b0_0  
arcgis                    2.0.1                 py39_2825    esri
arcgispro                 3.0                           0    esri
arcpy                     3.0             py39_arcgispro_36045  [arcgispro]  esri
arrow-cpp                 1.0.1                        10    esri
asn1crypto                1.4.0                      py_0  
astor                     0.8.1            py39haa95532_0  
astunparse                1.6.3                      py_0  
async-timeout             4.0.1              pyhd3eb1b0_0
atomicwrites              1.4.0                      py_0
attrs                     21.4.0             pyhd3eb1b0_0
azure-core                1.12.0                     py_0    esri
azure-storage-blob        12.8.0                     py_0    esri
backcall                  0.2.0              pyhd3eb1b0_0
beautifulsoup4            4.11.1           py39haa95532_0
black                     22.1.0                   py39_3    esri
blas                      1.0                         mkl
bleach                    4.1.0              pyhd3eb1b0_0
blinker                   1.4              py39haa95532_0
blosc                     1.21.0               h19a0ad4_0
boost                     1.79.0                   py39_0    esri
bottleneck                1.3.4            py39h080aedc_0
brotli                    1.0.9                ha925a31_2
brotlipy                  0.7.0           py39h2bbff1b_1003
bzip2                     1.0.8                he774522_0
ca-certificates           2022.3.29            haa95532_1
ca-certificates-curl      2022.4.26                     0    esri
cached-property           1.5.2                      py_0
cachetools                4.2.2              pyhd3eb1b0_0
cairo                     1.14.12                      11    esri
catalogue                 1.0.0              pyhd3eb1b0_0
catboost                  0.26             py39hcbf5309_0    esri
category_encoders         2.2.2                      py_0    esri
certifi                   2021.10.8        py39haa95532_2
cffi                      1.15.0           py39h2bbff1b_1
cfitsio                   3.470                h2bbff1b_7
cftime                    1.5.0                    py39_1    esri
chardet                   4.0.0           py39haa95532_1003
charls                    2.2.0                h6c2663c_0
charset-normalizer        2.0.4              pyhd3eb1b0_0
click                     8.0.4            py39haa95532_0
cliff                     3.8.0                      py_0    esri
cloudpickle               2.0.0              pyhd3eb1b0_0
cmaes                     0.8.2              pyh44b312d_0    esri
cmd2                      2.1.1            py39hcbf5309_0    esri
colorama                  0.4.4              pyhd3eb1b0_0
colorlog                  5.0.1            py39haa95532_1
colour                    0.1.5            py39haa95532_0
cppzmq                    4.4.1                         4    esri
cryptography              37.0.2                   py39_5    esri
cudatoolkit               11.1.1               heb2d755_9    esri
cudnn                     8.1.0.77             h3e0f4f4_0    esri
cycler                    0.11.0             pyhd3eb1b0_0
cymem                     2.0.6            py39hd77b12b_0
cython                    0.29.28          py39hd77b12b_0
cython-blis               0.4.1            py39h2bbff1b_1
cytoolz                   0.11.0           py39h2bbff1b_0
dask-core                 2022.5.0         py39haa95532_0
dataclasses               0.8                pyh6d0b6a4_7
decorator                 5.1.1              pyhd3eb1b0_0
deep-learning-essentials  3.0                arcgispro_17  [arcgispro]  esri
defusedxml                0.7.1              pyhd3eb1b0_0
descartes                 1.1.0              pyhd3eb1b0_4
despatch                  0.2.0                    py39_0    esri
dtreeviz                  1.3                        py_2    esri
einops                    0.3.2                      py_0    esri
ensemble-boxes            1.0.8                      py_0    esri
entrypoints               0.3              py39haa95532_0
et_xmlfile                1.1.0            py39haa95532_0
fastai                    1.0.63                   py39_2    esri
fastcache                 1.1.0            py39h196d8e1_0
fastprogress              0.2.3                    py39_0    esri
fasttext                  0.9.2            py39h2e52968_0    esri
filelock                  3.6.0              pyhd3eb1b0_0
fire                      0.4.0              pyh44b312d_0    esri
flake8                    4.0.1              pyhd3eb1b0_1
flatbuffers               2.0.0                h6c2663c_0
freetype                  2.12.1                        0    esri
frozenlist                1.2.0            py39h2bbff1b_0
fsspec                    2022.3.0         py39haa95532_0
future                    0.18.2                   py39_2    esri
gast                      0.4.0              pyhd3eb1b0_0
gdal                      3.4.0           arcgispro_py39_17119  [arcgispro]  esri
geomet                    0.3.0                      py_1    esri
geos                      3.5.0               arcgispro_2  [arcgispro]  esri
giflib                    5.2.1                h62dcd97_0
google-auth               2.6.0              pyhd3eb1b0_0
google-auth-oauthlib      0.4.1                      py_2
google-pasta              0.2.0              pyhd3eb1b0_0
googledrivedownloader     0.4                      py39_0    esri
graphviz                  2.38                 hfd603c8_2
grpcio                    1.42.0                   py39_0    esri
h3-py                     3.7.3                    py39_1    esri
h5py                      3.6.0                    py39_4    esri
html5lib                  1.1                pyhd3eb1b0_0
icc_rt                    2019.0.5            arcgispro_0  [arcgispro]  esri
icu                       68.1                 h6c2663c_0
idna                      3.3                pyhd3eb1b0_0
imagecodecs               2021.8.26        py39ha1f97ea_0
imageio                   2.9.0              pyhd3eb1b0_0
importlib-metadata        4.11.3           py39haa95532_0
importlib_metadata        4.11.3               hd3eb1b0_0
iniconfig                 1.1.1              pyhd3eb1b0_0
inplace-abn               1.1.0            py39_cuda111_0    esri
intel-openmp              2020.0            arcgispro_166  [arcgispro]  esri
ipykernel                 5.3.4            py39h7b7c402_0
ipython                   7.21.0                   py39_2    esri
ipython_genutils          0.2.0              pyhd3eb1b0_1
ipywidgets                7.6.5                      py_0    esri
isodate                   0.6.0                      py_0    esri
jdcal                     1.4.1              pyhd3eb1b0_0
jedi                      0.18.0                   py39_0    esri
jinja2                    3.0.3              pyhd3eb1b0_0
joblib                    1.1.0              pyhd3eb1b0_0
jpeg                      9d                            0    esri
json5                     0.9.5                      py_0    esri
jsonschema                3.2.0              pyhd3eb1b0_2
jupyter_client            6.1.7                      py_1    esri
jupyter_console           6.4.0                      py_1    esri
jupyter_contrib_core      0.3.3                      py_4    esri
jupyter_contrib_nbextensions 0.5.1                     py_24    esri
jupyter_core              4.6.3                    py39_2    esri
jupyter_highlight_selected_word 0.2.0                      py_4    esri
jupyter_latex_envs        1.4.6                      py_3    esri
jupyter_nbextensions_configurator 0.4.1                      py_3    esri
jupyterlab                2.2.10                     py_0    esri
jupyterlab_server         1.2.0                      py_0
jupyterlab_widgets        1.0.0              pyhd3eb1b0_1
keepalive                 0.5                      py39_1    esri
keras                     2.7.0                      py_0    esri
keras-base                2.7.0                      py_0    esri
keras-gpu                 2.7.0                         0    esri
keras-preprocessing       1.1.2              pyhd3eb1b0_0
keyring                   23.4.0                   py39_0    esri
kiwisolver                1.3.2            py39hd77b12b_0
laspy                     1.7.0            py39hb572761_1    esri
lcms2                     2.12                 h83e58a3_0
lerc                      3.0                pyh39e3cac_0    esri
libaec                    1.0.4                h33f27b4_1
libboost                  1.79.0               h001a745_0    esri
libcurl                   7.83.0                        0    esri
libdeflate                1.8                  h2bbff1b_5
libnghttp2                1.47.0                        0    esri
libopencv                 4.5.2           py39_cuda11.1_cudnn8.1_8    esri
libpng                    1.6.37               h2a8f88b_0
libprotobuf               3.19.1               h23ce68f_0
libsodium                 1.0.18                        2    esri
libtiff                   4.3.0                         1    esri
libuv                     1.40.0                        3    esri
libwebp                   1.2.2                h2bbff1b_0
libxgboost                1.5.0                hd77b12b_1
libxml2                   2.9.12              arcgispro_0  [arcgispro]  esri
libxslt                   1.1.34               he774522_0
libzopfli                 1.0.3                ha925a31_0
lightgbm                  3.2.1            py39hd77b12b_0
llvmlite                  0.38.0           py39h23ce68f_0
locket                    1.0.0            py39haa95532_0
lxml                      4.8.0            py39h1985fb9_0
lz4-c                     1.9.3                h2bbff1b_1
mako                      1.1.4              pyhd3eb1b0_0
markdown                  3.3.4            py39haa95532_0
markupsafe                2.0.1            py39h2bbff1b_0
matplotlib                3.4.3           py39_arcgispro_4  [arcgispro]  esri
matplotlib-base           3.4.3           py39_arcgispro_4  [arcgispro]  esri
mccabe                    0.7.0              pyhd3eb1b0_0
mistune                   0.8.4           py39h2bbff1b_1000
mkl                       2020.0            arcgispro_167  [arcgispro]  esri
mkl-service               2.3.0                    py39_2    esri
mkl_fft                   1.3.0                    py39_0    esri
mkl_random                1.2.2                    py39_0    esri
mljar-supervised          0.10.6                     py_9    esri
mmcv-full                 1.4.0           py39_cuda111_cudnn81_0    esri
mmdet                     2.19.0                   py39_0    esri
mmdet3d                   0.17.3          py39_cuda111_cudnn8_1    esri
mmsegmentation            0.19.0           py39h82bb817_1    esri
motmetrics                1.1.3                      py_0    esri
mpmath                    1.2.1            py39haa95532_0
msrest                    0.6.21                     py_0    esri
multi-scale-deformable-attention 1.0.0            py39_cuda111_1    esri
multidict                 5.1.0            py39h2bbff1b_2
murmurhash                1.0.7            py39hd77b12b_0
mypy_extensions           0.4.3            py39haa95532_1
nb_conda_kernels          2.3.1            py39haa95532_0
nbconvert                 5.6.1                    py39_1    esri
nbformat                  5.1.3                      py_1    esri
netcdf4                   1.5.7           py39_arcgispro_3  [arcgispro]  esri
networkx                  2.7.1              pyhd3eb1b0_0
ninja                     1.10.2               haa95532_5  
ninja-base                1.10.2               h6d14046_5
nlohmann_json             3.7.0                         2    esri
nose                      1.3.7           pyhd3eb1b0_1008
notebook                  5.7.10                   py39_1    esri
ntlm-auth                 1.4.0                      py_0    esri
numba                     0.55.1           py39hf11a4ad_0
numexpr                   2.8.1                    py39_0    esri
numpy                     1.20.1                   py39_0    esri
numpy-base                1.20.1                   py39_0    esri
nuscenes-devkit           1.1.3                      py_1    esri
nvidia-ml-py3             7.352.0                    py_0    esri
oauthlib                  3.2.0                    py39_0    esri
olefile                   0.46               pyhd3eb1b0_0
onnx                      1.9.0                    py39_2    esri
onnx-tf                   1.8.0            py39hb572761_3    esri
opencv                    4.5.2           py39_cuda11.1_cudnn8.1_8    esri
openjpeg                  2.4.0                h4fc8c34_0
openpyxl                  3.0.9              pyhd3eb1b0_0
openssl                   3.0.3                         2    esri
opt_einsum                3.3.0              pyhd3eb1b0_1
optuna                    2.8.0                      py_0    esri
packaging                 21.3               pyhd3eb1b0_0
pandas                    1.3.5            py39h6214cd6_0
pandocfilters             1.5.0              pyhd3eb1b0_0
parso                     0.8.3              pyhd3eb1b0_0
partd                     1.2.0              pyhd3eb1b0_1
pathspec                  0.9.0                      py_0    esri
patsy                     0.5.2            py39haa95532_1
pbr                       5.6.0              pyhd3eb1b0_0
pefile                    2019.4.18                  py_0
pickleshare               0.7.5           pyhd3eb1b0_1003
pillow                    9.1.0                    py39_3    esri
pip                       21.2.4           py39haa95532_0
pixman                    0.40.0               h2bbff1b_1
plac                      1.1.0            py39haa95532_0
platformdirs              2.4.0              pyhd3eb1b0_0
plotly                    4.5.4                      py_0    esri
pluggy                    0.13.1           py39haa95532_0
plyfile                   0.7.4              pyhd8ed1ab_0    esri
preshed                   3.0.6            py39h6c2663c_0
prettytable               2.1.0              pyhd8ed1ab_0    esri
pro_notebook_integration  3.0                      py39_1    esri
prometheus_client         0.8.0                      py_0    esri
prompt_toolkit            3.0.5                      py_0    esri
protobuf                  3.19.1           py39hd77b12b_0
psutil                    5.8.0            py39h2bbff1b_1
py                        1.11.0             pyhd3eb1b0_0
py-boost                  1.79.0           py39h1a5303b_0    esri
py-opencv                 4.5.2                    py39_8    esri
py-xgboost                1.5.0            py39haa95532_1
pyarrow                   1.0.1                    py39_3    esri
pyasn1                    0.4.8              pyhd3eb1b0_0
pyasn1-modules            0.2.8                      py_0
pybind11                  2.7.1                         0    esri
pybind11_json             0.2.6                         3    esri
pycocotools               2.0.2            py39h5685391_1    esri
pycodestyle               2.8.0              pyhd3eb1b0_0
pycparser                 2.21               pyhd3eb1b0_0
pyflakes                  2.4.0              pyhd3eb1b0_0
pygments                  2.9.0                      py_0    esri
pyjwt                     2.4.0                      py_1    esri
pyodbc                    4.0.32           py39hd77b12b_1
pyopenssl                 22.0.0             pyhd3eb1b0_0
pyparsing                 3.0.4              pyhd3eb1b0_0
pypdf2                    1.26.0                     py_4    esri
pyperclip                 1.8.2              pyhd8ed1ab_2    esri
pyquaternion              0.9.9                      py_0    esri
pyreadline3               3.3              py39hcbf5309_1    esri
pyrsistent                0.18.0           py39h196d8e1_0
pyshp                     2.1.3              pyhd3eb1b0_0
pysocks                   1.7.1            py39haa95532_0
pytest                    6.2.4                    py39_0    esri
python                    3.9.11                        3    esri
python-certifi-win32      1.6                        py_0    esri
python-dateutil           2.8.2              pyhd3eb1b0_0
python-editor             1.0.4              pyhd3eb1b0_0
python-flatbuffers        1.12               pyhd3eb1b0_0
python-graphviz           0.16               pyhd3eb1b0_1
python_abi                3.9                      1_cp39    esri
pytorch                   1.8.2           py3.9_cuda11.1_cudnn8.1_1    esri
pytz                      2022.1                   py39_0    esri
pywavelets                1.3.0            py39h2bbff1b_0
pywin32-ctypes            0.2.0                    py39_0    esri
pywin32-security          302                      py39_1    esri
pywinpty                  2.0.1                    py39_0    esri
pyyaml                    6.0              py39h2bbff1b_1
pyzmq                     22.2.1                   py39_0    esri
rdflib                    5.0.0                    py39_0    esri
regex                     2022.3.15        py39h2bbff1b_0
requests                  2.27.1             pyhd3eb1b0_0
requests-kerberos         0.12.0                        0    esri
requests-negotiate-sspi   0.5.3                    py39_0    esri
requests-oauthlib         1.3.0                      py_0
requests-toolbelt         0.9.1              pyhd3eb1b0_0
requests_ntlm             1.1.0                      py_0    esri
retrying                  1.3.3              pyhd3eb1b0_2
rsa                       4.7.2              pyhd3eb1b0_1
sacremoses                0.0.43                     py_0    esri
saspy                     3.7.8                      py_0    esri
scikit-image              0.17.2           py39hf11a4ad_0
scikit-learn              1.0.2                    py39_0    esri
scikit-plot               0.3.7                      py_2    esri
scipy                     1.6.2                    py39_0    esri
seaborn                   0.11.2             pyhd3eb1b0_0
send2trash                1.8.0              pyhd3eb1b0_1
sentencepiece             0.1.95           py39h59b6b97_0
setuptools                60.10.0                  py39_0    esri
shap                      0.39.0           py39h2e25243_0    esri
shapely                   1.7.1           py39_arcgispro_4  [arcgispro]  esri
simplegeneric             0.8.1            py39haa95532_2
six                       1.16.0                     py_0    esri
slicer                    0.0.7              pyhd8ed1ab_0    esri
snappy                    1.1.9                h6c2663c_0
soupsieve                 2.3.1              pyhd3eb1b0_0
spacy                     2.2.4            py39h2e52968_1    esri
sparqlwrapper             1.8.5                    py39_1    esri
sqlalchemy                1.3.12           py39h196d8e1_0
sqlite                    3.38.2                        0    esri
srsly                     1.0.5            py39hd77b12b_0
statsmodels               0.12.2           py39h2bbff1b_0
stevedore                 3.3.0            py39hcbf5309_1    esri
swat                      1.9.3                    py39_0    esri
sympy                     1.9                      py39_1    esri
tabulate                  0.8.9            py39haa95532_0
tbb                       2021.5.0             h59b6b97_0
tensorboard               2.6.0                      py_1
tensorboard-data-server   0.6.0            py39haa95532_0
tensorboard-plugin-wit    1.6.0                      py_0
tensorboardx              2.2                        py_0    esri
tensorflow-addons         0.15.0                   py39_8    esri
tensorflow-base           2.7.0           py39_cuda11.1_cudnn8.1_6    esri
tensorflow-estimator      2.7.0                      py_0    esri
tensorflow-gpu            2.7.0           py39_cuda11.1_cudnn8.1_6    esri
termcolor                 1.1.0            py39haa95532_1
terminado                 0.13.1           py39haa95532_0
terminaltables            3.1.0                      py_0    esri
testpath                  0.5.0                      py_0    esri
thinc                     7.4.0            py39h2e52968_0    esri
threadpoolctl             2.2.0              pyh0d69192_0
tifffile                  2021.7.2           pyhd3eb1b0_2
timm                      0.4.12                     py_0    esri
tokenizers                0.10.1                   py39_0    esri
toml                      0.10.2             pyhd3eb1b0_0
tomli                     1.2.2              pyhd3eb1b0_0
toolz                     0.11.2             pyhd3eb1b0_0
torch-cluster             1.5.9           py39_torch18.0_cuda11.1_3    esri
torch-geometric           1.7.2                    py39_0    esri
torch-scatter             2.0.7           py39_torch18.0_cuda11.1_3    esri
torch-sparse              0.6.10          py39_torch18.0_cuda11.1_2    esri
torch-spline-conv         1.2.1           py39_torch18.0_cuda11.1_3    esri
torchvision               0.9.2              py39_cu111_1    esri
torchvision-cpp           0.9.2           libtorch182_cuda111_cudnn81_0    esri
tornado                   6.1              py39h2bbff1b_0
tqdm                      4.64.0           py39haa95532_0
traitlets                 5.1.1              pyhd3eb1b0_0
transformers              4.5.1                      py_1    esri
trimesh                   2.35.39                    py_0    esri
typed-ast                 1.4.3            py39h2bbff1b_1
typeguard                 2.12.1                     py_0    esri
typing                    3.10.0.0         py39haa95532_0
typing-extensions         4.1.1                hd3eb1b0_0
typing_extensions         4.1.1              pyh06a4308_0
tzdata                    2021e                hda174b7_0
ujson                     5.1.0            py39hd77b12b_0
urllib3                   1.26.8             pyhd3eb1b0_0
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2    esri
wasabi                    0.9.1            py39haa95532_0
wcwidth                   0.2.5              pyhd3eb1b0_0
webencodings              0.5.1            py39haa95532_1
werkzeug                  2.0.3              pyhd3eb1b0_0
wheel                     0.37.1             pyhd3eb1b0_0
widgetsnbextension        3.5.2            py39haa95532_0
win_inet_pton             1.1.0                    py39_0    esri
wincertstore              0.2              py39haa95532_2
winkerberos               0.8.0                    py39_0    esri
winpty                    0.4.3                         4
wordcloud                 1.8.1                    py39_2    esri
wrapt                     1.13.3           py39h2bbff1b_2
x86cpu                    0.4                      py39_1    esri
xarray                    0.20.1             pyhd3eb1b0_1
xeus                      0.24.1                        8    esri
xeus-python               0.8.2                        10    esri
xgboost                   1.5.0            py39haa95532_1
xlrd                      2.0.1              pyhd3eb1b0_0
xlwt                      1.3.0            py39haa95532_0
xmltodict                 0.12.0             pyhd3eb1b0_0
xtl                       0.6.15                        1    esri
xz                        5.2.5                h8cc25b3_1
yaml                      0.2.5                         0    esri
yapf                      0.31.0             pyhd3eb1b0_0
yarl                      1.6.3            py39h2bbff1b_0
zeromq                    4.3.4                         0    esri
zfp                       0.5.5                hd77b12b_6
zipp                      3.7.0              pyhd3eb1b0_0
zlib                      1.2.12               h8cc25b3_2
zlib-ng                   2.0.5                         0    esri
zstd                      1.4.9                h19a0ad4_0

cmd中激活环境后执行测试代码

python helloworld.py

python tensorflowV.py

#helloworld.py

python 复制代码
import tensorflow as tf
print(tf.__version__)
print('hello world!')

#tensorflowV.py

python 复制代码
import tensorflow as tf
print('tensorflow version:'+tf.__version__)
tf.compat.v1.disable_eager_execution()
w1=tf.random.truncated_normal([2,3],0.0,1.0)
w2=tf.random.truncated_normal([3,1],0.0,1.0)

x=tf.compat.v1.placeholder(tf.float32,shape=(3,2),name="input")
a=tf.compat.v1.matmul(x,w1)
y=tf.compat.v1.matmul(a,w2)

with tf.compat.v1.Session() as s:
   init_op=tf.compat.v1.global_variables_initializer()
   s.run(init_op)
   print(s.run(y,feed_dict={x:[[0.7,0.9],[0.1,0.4],[0.5,0.8]]}))

vscode执行py文件需要设置vscode python执行环境

python 复制代码
快捷键:Ctrl+Shift+P
选择python select interpreter
选择下面路径的arcgispro-py3-clone版本
C:\Users\hsg\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone

本blog地址:https://blog.csdn.net/hsg77

相关推荐
无须logic ᭄6 分钟前
CrypTen项目实践
python·机器学习·密码学·同态加密
百流18 分钟前
scala文件编译相关理解
开发语言·学习·scala
Channing Lewis19 分钟前
flask常见问答题
后端·python·flask
Channing Lewis20 分钟前
如何保护 Flask API 的安全性?
后端·python·flask
水兵没月1 小时前
钉钉群机器人设置——python版本
python·机器人·钉钉
Evand J1 小时前
matlab绘图——彩色螺旋图
开发语言·matlab·信息可视化
我想学LINUX2 小时前
【2024年华为OD机试】 (A卷,100分)- 微服务的集成测试(JavaScript&Java & Python&C/C++)
java·c语言·javascript·python·华为od·微服务·集成测试
深度混淆2 小时前
C#,入门教程(04)——Visual Studio 2022 数据编程实例:随机数与组合
开发语言·c#
雁于飞2 小时前
c语言贪吃蛇(极简版,基本能玩)
c语言·开发语言·笔记·学习·其他·课程设计·大作业