由于 setuptools 无法在 conda 中安装 pytorch 是 conda 的依赖项,无法删除
Posted
技术标签:
【中文标题】由于 setuptools 无法在 conda 中安装 pytorch 是 conda 的依赖项,无法删除【英文标题】:Unable to install pytorch in conda due to setuptools is a dependency of conda and cannot be removed 【发布时间】:2019-08-23 13:10:55 【问题描述】:conda install pytorch torchvision cudatoolkit=9.0 -c pytorch
这是我遇到的错误
RemoveError: 'setuptools' is a dependency of conda and cannot be removed from
conda's operating environment.
但是,setuptools 在
conda list
。我该怎么办?
命名版本构建频道
_ipyw_jlab_nb_ext_conf 0.1.0 py36he6757f0_0 _r-mutex 1.0.0 mro_2 r _tflow_select 2.1.0 gpu anaconda absl-py 0.4.0 pypi_0 pypi 雪花石膏 0.7.10 py36hcd07829_0 anaconda 自定义 py36h363777c_0 anaconda-client 1.6.5 py36hd36550c_0 anaconda-navigator 1.6.9 py36hc720852_0 anaconda-project 0.8.0 py36h8b3bf89_0 asn1crypto 0.22.0 py36h8e79faa_1 astor 0.7.1 pypi_0 pypi astroid 1.5.3 py36h9d85297_0 astropy 2.0.2 py36h06391c4_4 babel 2.5.0 pypi_0 pypi 反向移植 1.0 py36h81696a8_1 backports.shutil_get_terminal_size 1.0.0 py36h79ab834_2 beautifulsoup4 4.6.0 py36hd4cc5e8_1 位数组 0.8.1 py36h6af124b_0 bkcharts 0.2 py36h7e685f7_0 blas 1.0 mkl blaze 0.11.3 py36h8a29ca5_0 漂白剂 2.0.0 py36h0a7e3d6_0 散景 0.12.10 py36h0be3b39_0 boto 2.48.0 py36h1a776d2_1 瓶颈 1.2.1 py36hd119dfa_0 bzip2 1.0.6 vc14hdec8e7a_1 [vc14] ca 证书 2018.11.29 ha4d7672_0 conda-forge 缓存控制 0.12.3 py36hfe50d7b_0 证书 2018.11.29 py36_1000 conda-forge cffi 1.10.0 py36hae3d1b5_1 chardet 3.0.4 py36h420ce6e_1 点击 6.7 py36hec8c647_0 cloudpickle 0.4.0 py36h639d8dc_0 客户端 1.2.2 py36hb10d595_1 colorama 0.3.9 py36h029ae33_0 comtypes 1.1.2 py36heb9b3d1_0 conda 4.6.8 py36_0 conda-forge conda-build 3.0.27 py36h309a530_0 conda-env 2.6.0 h36134e3_1 conda-verify 2.0.0 py36h065de53_0 控制台快捷方式 0.1.1 h6bb2dd7_3 contextlib2 0.5.5 py36he5d52c0_0 crowdposetools 2.0 pypi_0 pypi 密码学 2.5 py36h74b6da3_1 conda-forge cudatoolkit 9.0 1 anaconda cudnn 7.1.4 cuda9.0_0 anaconda curl 7.55.1 vc14hdaba4a4_3 [vc14] 循环仪 0.10.0 py36h009560c_0 cython 0.26.1 py36h18049ac_0 cytoolz 0.8.2 py36h547e66e_0 dask 0.17.5 py36_0 dask-core 0.17.5 py36_0 datashape 0.5.4 py36h5770b85_0 装饰器 4.1.2 py36he63a57b_0 distlib 0.2.5 py36h51371be_0 分布式 1.21.8 py36_0 docker-pycreds 0.3.0 pypi_0 pypi docutils 0.14 py36h6012d8f_0 入口点 0.2.3 py36hfd66bb0_2 et_xmlfile 1.0.1 py36h3d2d736_0 快速缓存 1.0.2 py36hffdae1b_0 文件锁 2.0.12 py36hd7ddd41_0 烧瓶 0.12.2 py36h98b5e8f_0 烧瓶-cors 3.0.3 py36h8a3855d_0 字体-ttf-dejavu-sans-mono 2.37 h6964260_0 字体-ttf-inconsolata 2.001 hcb22688_0 字体-ttf-源代码-pro 2.030 h7457263_0 字体-ttf-ubuntu 0.83 h8b1ccd4_0 字体-anaconda 1 h8fa9717_0 freetype 2.9.1 h5db478b_1005 conda-forge gast 0.2.0 pypi_0 pypi geos 3.6.2 he025d50_3 conda-forge get_terminal_size 1.0.0 h38e98db_0 gevent 1.2.2 py36h342a76c_0 glob2 0.5 py36h11cc1bd_1 谷歌图像下载 2.4.2 pypi_0 pypi greenlet 0.4.12 py36ha00ad21_0 grpcio 1.14.1 pypi_0 pypi h5py 2.8.0 py36hfa6e2cd_0 conda-forge hdf5 1.10.1 vc14hb361328_0 [vc14] heapdict 1.0.0 py36h21fa5f4_0 html5lib 0.999999999 py36ha09b1f3_0 icc_rt 2017.0.4 h97af966_0 ICU 58.2 vc14hc45fdbb_0 [vc14] idna 2.6 py36h148d497_1 imageio 2.2.0 py36had6c2d2_0 图像大小 0.7.1 py36he29f638_0 imutils 0.5.1 pypi_0 pypi intel-openmp 2018.0.0 hcd89f80_7 ipykernel 4.6.1 py36hbb77b34_0 ipython 6.1.0 py36h236ecc8_1 ipython_genutils 0.2.0 py36h3c5d0ee_0 ipywidgets 7.0.0 py36h2e74ada_0 isort 4.2.15 py36h6198cc5_0 itsdangerous 0.24 py36hb6c5a24_1 jdcal 1.3 py36h64a5255_0 绝地 0.10.2 py36hed927a0_0 jinja2 2.9.6 py36h10aa3a0_1 jpeg 9b vc14h4d7706e_1 [vc14] jsonschema 2.6.0 py36h7636477_0 jupyter 1.0.0 py36h422fd7e_2 jupyter_client 5.1.0 py36h9902a9a_0 jupyter_console 5.2.0 py36h6d89b47_1 jupyter_core 4.3.0 py36h511e818_0 jupyterlab 0.27.0 py36h34cc53b_2 jupyterlab_launcher 0.4.0 py36h22c3ccf_0 keras 2.2.4 0 anaconda keras 应用程序 1.0.6 py36_0 anaconda keras-base 2.2.4 py36_0 anaconda keras-preprocessing 1.0.5 py36_0 anaconda kiwisolver 1.0.1 py36he980bc4_1002 conda-forge kmmodes 0.9 pypi_0 pypi krb5 1.16.3 h038dc86_1000 conda-forge 惰性对象代理 1.3.1 py36hd1c21d2_0 libcurl 7.64.0 h4496350_2 conda-forge libgpuarray 0.7.6 hfa6e2cd_1003 conda-forge libiconv 1.15 vc14h29686d3_5 [vc14] libpng 1.6.36 h7602738_1000 conda-forge libprotobuf 3.6.1 h1a1b453_1000 conda-forge libssh2 1.8.0 vc14hcf584a9_2 [vc14] libtiff 4.0.9 hf1753bf_1 conda-forge libxml2 2.9.4 vc14h8fd0f11_5 [vc14] libxslt 1.1.29 vc14hf85b8d4_5 [vc14] llvmlite 0.20.0 py36_0 小盒 0.2.0 py36hfed976d_1 锁定文件 0.12.2 py36h0468280_0 lxml 4.1.0 py36h0dcd83c_0 lzo 2.10 vc14h0a64fa6_1 [vc14] m2-bash 4.3.042 5 m2-gcc-libs 5.3.0 4 m2-heimdal 1.5.3 10 m2-heimdal-libs 1.5.3 10 m2-icu 56.1 2 m2-libcrypt 1.3 2 m2-libdb 5.3.28 3 m2-libedit 3.1 20150326 m2-libopenssl 1.0.2.g 2 m2-libreadline 6.3.008 8 m2-libsqlite 3.10.0.0 2 m2-msys2-runtime 2.5.0.17080.65c939c 3 m2-ncurses 6.0.20160220 2 m2-openssh 7.1p2 2 m2-openssl 1.0.2.g 2 m2-zlib 1.2.8 4 m2w64-bzip2 1.0.6 6 m2w64-diffutils 3.3.2 2 m2w64-gcc-libgfortran 5.3.0 6 m2w64-gcc-libs 5.3.0 7 m2w64-gcc-libs-core 5.3.0 7 m2w64-gmp 6.1.0 2 m2w64-grep 2.24 2 m2w64-libwinpthread-git 5.0.0.4634.697f757 2 m2w64-pcre 8.38 2 m2w64-wineditline 2.101 5 m2w64-zlib 1.2.8 10 mako 1.0.7 py_1 conda-forge 降价 2.6.11 py_0 conda-forge 标记安全 1.0 py36h0e26971_1 matplotlib 3.0.2 py36_1002 conda-forge matplotlib-base 3.0.2 py36h3e3dc42_1002 conda-forge mccabe 0.6.1 py36hb41005a_1 menuinst 1.4.14 py36_1000 conda-forge misune 0.7.4 py36h4874169_0 mkl 2018.0.0 h36b65af_4 mkl 服务 1.1.2 py36h57e144c_4 mpmath 0.19 py36he326802_2 mro-base 3.5.1 3 r mro-base_impl 3.5.1 0 r msgpack 0.5.6 pypi_0 pypi msgpack-python 0.4.8 py36h58b1e9d_0 msys2-conda-epoch 20160418 1 多重调度 0.4.9 py36he44c36e_0 navigator-updater 0.1.0 py36h8a7b86b_0 nbconvert 5.3.1 py36h8dc0fde_0 nbformat 4.4.0 py36h3a5bc1b_0 networkx 2.0 py36hff991e3_0 nltk 3.2.4 py36hd0e0a39_0 鼻子 1.3.7 py36h1c3779e_2 笔记本 5.0.0 py36hd9fbf6f_2 npm 0.1.1 pypi_0 pypi numba 0.35.0 np112py36_0 numexpr 2.6.2 py36h7ca04dc_1 numpy 1.14.5 pypi_0 pypi numpydoc 0.7.0 py36ha25429e_0 odo 0.5.1 py36h7560279_0 olefile 0.44 py36h0a7bdd2_0 open3d 0+unknown pypi_0 pypi opencv-contrib-python 3.4.1.15 pypi_0 pypi opencv-python 4.0.0.21 pypi_0 pypi openpyxl 2.4.8 py36hf3b77f6_1 openssl 1.0.2r hfa6e2cd_0 conda-forge 可选-django 0.1.0 pypi_0 pypi 打包 16.8 py36ha0986f6_1 熊猫 0.23.0 py36h830ac7b_0 pandoc 1.19.2.1 hb2460c7_1 pandocfilters 1.4.2 py36h3ef6317_1 partd 0.3.8 py36hc8e763b_0 path.py 10.3.1 py36h3dd8b46_0 pathlib2 2.3.0 py36h7bfb78b_0 patsy 0.4.1 py36h42cefec_0 pep8 1.7.0 py36h0f3d67a_0 pickleshare 0.7.4 py36h9de030f_0 枕头 5.2.0 py36h08bbbbd_0 点 19.0.3 pypi_0 pypi pkginfo 1.4.1 py36hb0f9cfa_1 剧情 2.7.0 pypi_0 pypi ply 3.10 py36h1211beb_0 进度 1.3 py36hbeca8d3_0 prompt_toolkit 1.0.15 py36h60b8f86_0 protobuf 3.6.1 pypi_0 pypi psutil 5.4.0 py36h4e662fb_0 py 1.4.34 py36ha4aca3a_1 pyclustering 0.8.0 pypi_0 pypi pycocotools 2.0 pypi_0 pypi pycodestyle 2.3.1 py36h7cc55cd_0 pycosat 0.6.3 py36h413d8a4_0 pycparser 2.18 py36hd053e01_1 pycrypto 2.6.1 py36he68e6e2_1 pycurl 7.43.0.2 py36h74b6da3_0 pydotplus 2.0.2 pypi_0 pypi pyflakes 1.6.0 py36h0b975d6_0 pygments 2.2.0 py36hb010967_0 pygpu 0.7.6 py36h452e1ab_1000 conda-forge pylint 1.7.4 py36ha4e6ded_0 pyodbc 4.0.17 py36h0006bc2_0 pyopenssl 17.2.0 py36h15ca2fc_0 pyparsing 2.2.0 py36h785a196_1 pyqt 5.6.0 py36_2 pyreadline 2.1 py36_1000 conda-forge pysocks 1.6.7 py36h698d350_1 pytables 3.4.2 py36h71138e3_2 pytesseract 0.2.0 pypi_0 pypi pytest 3.2.1 py36h753b05e_1 python 3.6.3 h9e2ca53_1 python-dateutil 2.6.1 py36h509ddcb_1 python-graphviz 0.8.3 pypi_0 pypi pytz 2017.2 py36h05d413f_1 pywavelets 0.5.2 py36hc649158_0 pywin32 221 py36h9c10281_0 pyyaml 3.12 py36h1d1928f_1 pyzmq 16.0.2 py36h38c27d9_2 qt 5.6.2 vc14_1 conda-forge qtawesome 0.4.4 py36h5aa48f6_0 qtconsole 4.3.1 py36h99a29a9_0 qtpy 1.3.1 py36hb8717c5_0 r-assertthat 0.2.0 mro351_0 r r-backports 1.1.2 mro351_0 r r-base64enc 0.1_3 mro351_0 r r-bh 1.66.0_1 mro351hf348343_0 r r-bindr 0.1.1 mro351_0 r r-bindrcpp 0.2.2 mro351_0 r r 位 1.1_14 mro351_0 r r-bit64 0.9_7 mro351_0 r r-bitops 1.0_6 mro351_0 r r-blob 1.1.1 mro351_0 r r 扫帚 0.5.0 mro351_0 r r-catools 1.17.1.1 mro351hf348343_0 r r-cellranger 1.1.0 mro351_0 r r-cli 1.0.0 mro351_0 r r-config 0.3 mro351_0 r r 蜡笔 1.3.4 mro351_0 r r-curl 3.2 mro351_0 r r-dbi 1.0.0 mro351hf348343_0 r r-dbplyr 1.2.2 mro351_0 r r-digest 0.6.15 mro351_0 r r-dplyr 0.7.6 mro351_0 r r 评估 0.11 mro351_0 r r-fansi 0.2.3 mro351_0 r r-forcats 0.3.0 mro351_0 r r-glue 1.3.0 mro351_0 r r-haven 1.1.2 mro351_0 r r-highr 0.7 mro351_0 r r-hms 0.4.2 mro351_0 r r-htmltools 0.3.6 mro351_0 r r-htmlwidgets 1.2 mro351_0 r r-httpuv 1.4.5 mro351_0 r r-httr 1.3.1 mro351_0 r r-jsonlite 1.5 mro351_0 r r-knitr 1.20 mro351_0 r r-later 0.7.3 mro351_0 r r 格 0.20_35 mro351_0 r r-lazyeval 0.2.1 mro351_0 r r-magrittr 1.5 mro351_0 r r-markdown 0.8 mro351_0 r r-mime 0.5 mro351_0 r r-miniui 0.1.1.1 mro351hf348343_0 r r-蒙古石 1.6 mro351_0 r r-nlme 3.1_137 mro351_0 r r-odbc 1.1.6 mro351_0 r r-openssl 1.0.2 mro351_0 r r-packrat 0.4.9_3 mro351_0 r r 柱 1.3.0 mro351_0 r r-pkgconfig 2.0.1 mro351_0 r r-pki 0.1_5.1 mro351hf348343_0 r r-plogr 0.2.0 mro351_0 r r-plyr 1.8.4 mro351_0 r r-prettyunits 1.0.2 mro351_0 r r-profvis 0.3.5 mro351_0 r r-promises 1.0.1 mro351_0 r r-purrr 0.2.5 mro351_0 r r-r6 2.2.2 mro351hf348343_0 r r-rappdirs 0.3.1 mro351_0 r r-rcpp 0.12.18 mro351hf348343_0 r r-rcurl 1.95_4.11 mro351hf348343_0 r r-readr 1.1.1 mro351_0 r r-readxl 1.1.0 mro351_0 r r-rematch 1.0.1 mro351_0 r r-reshape2 1.4.3 mro351_0 r r-revoutils 11.0.0 mro351_0 r r-revoutilsmath 11.0.0 mro351_0 r r-rjava 0.9_9 mro343h889e2dd_0 r r-rjdbc 0.2_7.1 mro351hf348343_0 r r-rjsonio 1.3_0 mro351hf348343_0 r r-rlang 0.2.1 mro351_0 r r-rmarkdown 1.10 mro351_0 r r-rprojroot 1.3_2 mro351_0 r r-rsconnect 0.8.8 mro351_0 r r-rstudioapi 0.7 mro351_0 r r-shiny 1.1.0 mro351_0 r r-sourcetools 0.1.7 mro351_0 r r-sparklyr 0.8.4 mro351_0 r r-stringi 1.1.7 mro351_0 r r-stringr 1.3.1 mro351_0 r r-tibble 1.4.2 mro351_0 r r-tidyr 0.8.1 mro351_0 r r-tidyselect 0.2.4 mro351_0 r r-tinytex 0.6 mro351_0 r r-utf8 1.1.4 mro351_0 r r-withr 2.1.2 mro351_0 r r-xfun 0.3 mro351_0 r r-xml2 1.2.0 mro351_0 r r-xtable 1.8_2 mro351_0 r r-yaml 2.2.0 mro351_0 r 请求 2.18.4 py36h4371aae_1 绳索 0.10.5 py36hcaf5641_0 rstudio 1.1.456 vc14h1ad3211_1 [vc14] r ruamel_yaml 0.11.14 py36h9b16331_2 scikit-image 0.13.0 py36h6dffa3f_1 scikit-learn 0.19.1 py36h53aea1b_0 scipy 1.0.0 py36h1260518_0 seaborn 0.8.0 py36h62cb67c_0 硒 3.14.1 pypi_0 pypi 匀称 1.6.4 py36hc90234e_1000 conda-forge simplegeneric 0.8.1 py36heab741f_0 单一调度 3.4.0.3 py36h17d0c80_0 sip 4.19.8 py36h6538335_1000 conda-forge 6 1.11.0 py36h4db2310_1 滑动窗口 0.0.13 pypi_0 pypi snowballstemmer 1.2.1 py36h763602f_0 排序集合 0.5.3 py36hbefa0ab_0 排序容器 1.5.7 py36ha90ac20_0 狮身人面像 1.6.3 py36h9bb690b_0 sphinxcontrib 1.0 py36hbbac3d2_1 sphinxcontrib-websupport 1.0.1 py36hb5e5916_1 spyder 3.2.4 py36h8845eaa_0 sqlalchemy 1.1.13 py36h5948d12_0 sqlite 3.26.0 hfa6e2cd_1001 conda-forge statsmodels 0.8.0 py36h6189b4c_0 同情 1.1.1 py36h96708e0_0 tblib 1.3.2 py36h30f5020_0 张量板 1.11.0 py36he025d50_0 anaconda 张量流 1.11.0 gpu_py36h5dc63e2_0 anaconda tensorflow-base 1.11.0 gpu_py36h6e53903_0 anaconda tensorflow-gpu 1.11.0 h0d30ee6_0 anaconda termcolor 1.1.0 pypi_0 pypi 测试路径 0.3.1 py36h2698cfe_0 theano 1.0.3 py36_0 conda-forge tk 8.6.9 hfa6e2cd_1000 conda-forge toolz 0.8.2 py36he152a52_0 龙卷风 4.5.2 py36h57f6048_0 traitlets 4.3.2 py36h096827d_0 键入 3.6.2 py36hb035bda_0 unicodecsv 0.14.1 py36h6450c06_0 urllib3 1.22 py36h276f60a_0 vc 14 0 conda-forge vs2015_runtime 15.5.2 3 vs2015_win-64 14.0.25123 h17c34da_3 wcwidth 0.1.7 py36h3d5aa90_0 webencodings 0.5.1 py36h67c50ae_1 websocket-client 0.53.0 pypi_0 pypi werkzeug 0.12.2 py36h866a736_0 车轮 0.29.0 py36h6ce6cde_1 小部件nbextension 3.0.2 py36h364476f_1 win_inet_pton 1.0.1 py36he67d7fd_1 win_unicode_console 0.5 py36hcdbd4b5_0 wincertstore 0.2 py36h7fe50ca_0 包装 1.10.11 py36he5f5981_0 xlrd 1.1.0 py36h1cb58dc_1 xlsxwriter 1.0.2 py36hf723b7d_0 xlwings 0.11.4 py36hd3cf94d_0 xlwt 1.3.0 py36h1a4751e_0 yaml 0.1.7 vc14hb31d195_1 [vc14] zict 0.1.3 py36h2d8e73e_0 zlib 1.2.11 vc14h1cdd9ab_1 [vc14]
【问题讨论】:
在环境中安装pytorch
,而不是在安装conda
的基础环境中
【参考方案1】:
正如评论中提到的,尝试创建一个环境并安装pytorch。 我已按照以下步骤操作,它对我有用。
使用命令创建 conda 环境:
conda create -n my_env python=3.6
激活环境。
source activate my_env
安装pytorch
conda install pytorch torchvision cudatoolkit=9.0 -c pytorch
注意:my_env 是您的环境名称。
希望这会有所帮助。
【讨论】:
创建新环境面临setuptools
同样的问题。以上是关于由于 setuptools 无法在 conda 中安装 pytorch 是 conda 的依赖项,无法删除的主要内容,如果未能解决你的问题,请参考以下文章
‘setuptools‘ is a dependency of conda and cannot be removed from
‘setuptools‘ is a dependency of conda and cannot be removed from
由于 python.app 错误,conda 更新后无法启动 Spyder