python 路径带空格_在路径中有空格时,如何处理???

经常在路径中有空格,就会出现错误,比如以下:

conda create --prefix=D:\Program Files (x86)\python\Python36-32 python=3.6

在conda进行指定python环境时,由于Program Files (x86)含有空格,会出现以下错误:

PackagesNotFoundError: The following packages are not available fromcurrent channels:- \python\python36-32

-files

Current channels:- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64

- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch

To searchfor alternate channels that may provide the conda package you're

looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

但是去掉空格就可以正常创建,所以时空格原因,这里的处理办法是:给路径加上双引号。如下:

conda create --prefix="D:\Program Files (x86)\python\Python36-32" python=3.6

这时候就可以顺利执行了。

PackagesNotFoundError: The following packages are not available from current channels:

- \python\python36-32  - files

Current channels:

- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch

To search for alternate channels that may provide the conda package you'relooking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值