在路徑中有空格時,如何處理???


經常在路徑中有空格,就會出現錯誤,比如以下:

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 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'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.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM