如何创建一个带有指定版本Python和JupyterLab的环境?

  请问要如何在Anaconda中创建一个同时拥有Python 3.7.4与JupyterLab 1.1.4的环境?

  我在cmd中通过以下命令创建了一个Python 3.7.4环境:

D:\Anaconda3\envs>conda create -n dp python=3.7
WARNING: A directory already exists at the target location 'D:\Anaconda3\envs\dp'
but it is not a conda environment.
Continue creating environment (y/[n])? y

Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: D:\Anaconda3\envs\dp

  added / updated specs:
    - python=3.7


The following NEW packages will be INSTALLED:

  ca-certificates    anaconda/pkgs/main/win-64::ca-certificates-2019.8.28-0
  certifi            anaconda/pkgs/main/win-64::certifi-2019.9.11-py37_0
  openssl            anaconda/pkgs/main/win-64::openssl-1.1.1d-he774522_2
  pip                anaconda/pkgs/main/win-64::pip-19.2.3-py37_0
  python             anaconda/pkgs/main/win-64::python-3.7.4-h5263a28_0
  setuptools         anaconda/pkgs/main/win-64::setuptools-41.4.0-py37_0
  sqlite             anaconda/pkgs/main/win-64::sqlite-3.30.0-he774522_0
  vc                 anaconda/pkgs/main/win-64::vc-14.1-h0510ff6_4
  vs2015_runtime     anaconda/pkgs/main/win-64::vs2015_runtime-14.16.27012-hf0eaf9b_0
  wheel              anaconda/pkgs/main/win-64::wheel-0.33.6-py37_0
  wincertstore       anaconda/pkgs/main/win-64::wincertstore-0.2-py37_0

  Python 3.7.4被成功安装,但当继续安装JupyterLab时,会出现以下问题:

D:\Anaconda3\envs>activate dp

D:\Anaconda3\envs>conda.bat activate dp

(dp) D:\Anaconda3\envs>conda install jupyterlab
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.

...

UnsatisfiableError: The following specifications were found to be incompatible with each other:



Package tornado conflicts for:
jupyterlab -> tornado[version='!=6.0.0,!=6.0.1,!=6.0.2']
Package jinja2 conflicts for:
jupyterlab -> jinja2[version='>=2.10']
Package notebook conflicts for:
jupyterlab -> notebook[version='>=4.3|>=4.3.1']
Package nodejs conflicts for:
jupyterlab -> nodejs[version='<10']
Package sqlite conflicts for:
python=3.7 -> sqlite[version='>=3.25.3,<4.0a0|>=3.26.0,<4.0a0|>=3.27.2,<4.0a0|>=3.28.0,<4.0a0|>=3.29.0,<4.0a0']
Package openssl conflicts for:
python=3.7 -> openssl[version='>=1.1.1a,<1.1.2a|>=1.1.1b,<1.1.2a|>=1.1.1c,<1.1.2a']
Package pip conflicts for:
python=3.7 -> pip
Package jupyterlab_launcher conflicts for:
jupyterlab -> jupyterlab_launcher[version='>=0.10.0,<0.11.0|>=0.11.0,<0.12.0|>=0.11.2,<0.12.0|>=0.13.1,<0.14.0|>=0.4.0|>=0.6.0,<0.7.0']
Package subprocess32 conflicts for:
jupyterlab -> subprocess32
Package futures conflicts for:
jupyterlab -> futures
Package jupyterlab_server conflicts for:
jupyterlab -> jupyterlab_server[version='>=0.2.0,<0.3.0|>=1.0.0,<2.0.0']
Package vc conflicts for:
python=3.7 -> vc[version='14.*|>=14.1,<15.0a0']

  这个是什么问题?如何解决?感觉默认的base环境很庞大,很多东西用不到。但想要使用JupyterLab又不得不安装……

1个回答

用virtualenv试下呢,这个轻量,也稳定,至今没遇到问题

u011367208
べ断桥烟雨ミ 是说用virtualenv开一个基于base(root)的小型环境吗?这个在Pycharm上试过几次,没搞明白要怎么用……
4 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问

相似问题

1
python】有requirements.txt文件后,如何创建对应的conda虚拟环境?可以使用pip命令来安装吗?
3
python安装过程中,有一个默认勾选Python是否要勾选,也就是环境变量。
1
python的人脸识别毕业设计
0
【求助】Anaconda 建立python 3.6 新环境后,激活环境,进入python交互模式又变回原来的python3.7 。
1
python命令行用scrapy创建项目的时候总是闪退
3
python如何统计某些指定词语的词频
0
我用Miniconda装了python2和python3的环境,前几天切换python环境还还好的,今天突然报错
1
ubuntu中一个工程可以同时使用两个版本的python吗
4
python 和 Java 的区别
1
Python3.7+Pyside2 运行exe文件提示“ImportError: DLL load failed: 找不到指定的程序。
1
如何使用python的docx模块,获取指定段落后的表格
2
如何指定uwsgi在启动时默认的python版本
1
python的pip工具安装第三方库,在不指定安装版本的情况自动安装兼容已有包的版本?
1
如何在django中使用mysql自带的MySQL Connector Python 8.0 for Python 3.7?
4
pip升级怎么提示这个 怎么 解决 老版本也删除了 我的是python 3.7
3
python创建创建数组的问题
1
为何Python不像JVM那样推出个“虚拟机版”(托管环境版)?
1
Python如何连续创建"同名+编号"的列表?
2
文本已清洗和分词,词语带权重,如何用python做自定义形状词云图呢?
2
python如何分隔带有ID的数组?