最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

新一代python包管理軟件mamba的使用

 更新時間:2025年06月29日 10:26:29   作者:skywalk8163  
新一代python的包管理軟件mambaMamba 是一個高性能的跨平臺包管理器,用于替代和擴展 Conda,采用 C++ 重構(gòu),實現(xiàn)多線程的倉庫數(shù)據(jù)和包文件并行下載,大幅提升依賴解析速度

Mamba 是一個高性能的跨平臺包管理器,用于替代和擴展 Conda,采用 C++ 重構(gòu),實現(xiàn)多線程的倉庫數(shù)據(jù)和包文件并行下載,大幅提升依賴解析速度。

官網(wǎng)repo:mamba-org/micromamba-releases: Micromamba executables mirrored from conda-forge as Github releases

下載安裝

直接下載最新的可執(zhí)行版本:

直接到發(fā)布頁面下載即可,比如當(dāng)前最新版本是2.3.0版本,下載linux版:

wget https://github.com/mamba-org/micromamba-releases/releases/download/2.3.0-1/micromamba-linux-64

拿到文件后,chmod 755 給個執(zhí)行權(quán)限,即可執(zhí)行:

root@j7ba948ec6f7425190a818336fcd0045-task0-0:/tmp/code# chmod 755 micromamba-linux-64 
root@j7ba948ec6f7425190a818336fcd0045-task0-0:/tmp/code# ./micromamba-linux-64 
Version: 2.3.0 

./micromamba-linux-64 [OPTIONS] [SUBCOMMAND]

OPTIONS:
  -h,     --help              Print this help message and exit 
          --version           

這時候mamab就可以直接用了。

使用安裝腳本安裝

直接下載repo源代碼,用里面的安裝腳本安裝即可。

git clone https://github.com/mamba-org/micromamba-releases

然后執(zhí)行里面的install.sh 腳本即可。

也可以直接使用wget或者curl獲得安裝腳本,比如: 

wget https://raw.githubusercontent.com/mamba-org/micromamba-releases/refs/heads/main/install.sh

curl https://raw.githubusercontent.com/mamba-org/micromamba-releases/refs/heads/main/install.sh

下載并改名:

curl -L https://raw.githubusercontent.com/mamba-org/micromamba-releases/refs/heads/main/install.sh -o micromamba.sh

實在沒辦法,還可以直接把下面代碼存盤,存為install.sh ,然后執(zhí)行即可安裝mamba:

#!/bin/sh

set -eu

# Detect the shell from which the script was called
parent=$(ps -o comm $PPID |tail -1)
parent=${parent#-}  # remove the leading dash that login shells have
case "$parent" in
  # shells supported by `micromamba shell init`
  bash|fish|xonsh|zsh)
    shell=$parent
    ;;
  *)
    # use the login shell (basename of $SHELL) as a fallback
    shell=${SHELL##*/}
    ;;
esac

# Parsing arguments
if [ -t 0 ] ; then
  printf "Micromamba binary folder? [~/.local/bin] "
  read BIN_FOLDER
  printf "Init shell ($shell)? [Y/n] "
  read INIT_YES
  printf "Configure conda-forge? [Y/n] "
  read CONDA_FORGE_YES
fi

# Fallbacks
BIN_FOLDER="${BIN_FOLDER:-${HOME}/.local/bin}"
INIT_YES="${INIT_YES:-yes}"
CONDA_FORGE_YES="${CONDA_FORGE_YES:-yes}"

# Prefix location is relevant only if we want to call `micromamba shell init`
case "$INIT_YES" in
  y|Y|yes)
    if [ -t 0 ]; then
      printf "Prefix location? [~/micromamba] "
      read PREFIX_LOCATION
    fi
    ;;
esac
PREFIX_LOCATION="${PREFIX_LOCATION:-${HOME}/micromamba}"

# Computing artifact location
case "$(uname)" in
  Linux)
    PLATFORM="linux" ;;
  Darwin)
    PLATFORM="osx" ;;
  *NT*)
    PLATFORM="win" ;;
esac

ARCH="$(uname -m)"
case "$ARCH" in
  aarch64|ppc64le|arm64)
      ;;  # pass
  *)
    ARCH="64" ;;
esac

case "$PLATFORM-$ARCH" in
  linux-aarch64|linux-ppc64le|linux-64|osx-arm64|osx-64|win-64)
      ;;  # pass
  *)
    echo "Failed to detect your OS" >&2
    exit 1
    ;;
esac

if [ "${VERSION:-}" = "" ]; then
  RELEASE_URL="https://github.com/mamba-org/micromamba-releases/releases/latest/download/micromamba-${PLATFORM}-${ARCH}"
else
  RELEASE_URL="https://github.com/mamba-org/micromamba-releases/releases/download/${VERSION}/micromamba-${PLATFORM}-${ARCH}"
fi


# Downloading artifact
mkdir -p "${BIN_FOLDER}"
if hash curl >/dev/null 2>&1; then
  curl "${RELEASE_URL}" -o "${BIN_FOLDER}/micromamba" -fsSL --compressed ${CURL_OPTS:-}
elif hash wget >/dev/null 2>&1; then
  wget ${WGET_OPTS:-} -qO "${BIN_FOLDER}/micromamba" "${RELEASE_URL}"
else
  echo "Neither curl nor wget was found" >&2
  exit 1
fi
chmod +x "${BIN_FOLDER}/micromamba"


# Initializing shell
case "$INIT_YES" in
  y|Y|yes)
    case $("${BIN_FOLDER}/micromamba" --version) in
      1.*|0.*)
        shell_arg=-s
        prefix_arg=-p
        ;;
      *)
        shell_arg=--shell
        prefix_arg=--root-prefix
        ;;
    esac
    "${BIN_FOLDER}/micromamba" shell init $shell_arg "$shell" $prefix_arg "$PREFIX_LOCATION"

    echo "Please restart your shell to activate micromamba or run the following:\n"
    echo "  source ~/.bashrc (or ~/.zshrc, ~/.xonshrc, ~/.config/fish/config.fish, ...)"
    ;;
  *)
    echo "You can initialize your shell later by running:"
    echo "  micromamba shell init"
    ;;
esac


# Initializing conda-forge
case "$CONDA_FORGE_YES" in
  y|Y|yes)
    "${BIN_FOLDER}/micromamba" config append channels conda-forge
    "${BIN_FOLDER}/micromamba" config append channels nodefaults
    "${BIN_FOLDER}/micromamba" config set channel_priority strict
    ;;
esac

開始使用mamba

比如前面,我們已經(jīng)下載了minimamba文件,并chmod 755 添加了執(zhí)行權(quán)限,就可以直接開始執(zhí)行了:

創(chuàng)建一個python3.10的虛擬環(huán)境

./micromamba-linux-64 create -n paddle python=3.10

感覺速度確實挺快的,輸出

Transaction finished

To activate this environment, use:

    micromamba-linux-64 activate paddle

Or to execute a single command in this environment, use:

    micromamba-linux-64 run -n paddle mycommand

但是后面激活出了點問題,簡單來說就是沒激活成功

 ./micromamba-linux-64 activate paddle

'micromamba-linux-64' is running as a subprocess and can't modify the parent shell.
Thus you must initialize your shell before using activate and deactivate.

To initialize the current bash shell, run:
    $ eval "$(micromamba-linux-64 shell hook --shell bash)"
and then activate or deactivate with:
    $ micromamba-linux-64 activate
To automatically initialize all future (bash) shells, run:
    $ micromamba-linux-64 shell init --shell bash --root-prefix=~/.local/share/mamba
If your shell was already initialized, reinitialize your shell with:
    $ micromamba-linux-64 shell reinit --shell bash
Otherwise, this may be an issue. In the meantime you can run commands. See:
    $ micromamba-linux-64 run --help

Supported shells are {bash, zsh, csh, posix, xonsh, cmd.exe, powershell, fish, nu}.
critical libmamba Shell not initialized

 但是用mamba激活成功了:

root@j7ba948ec6f7425190a818336fcd0045-task0-0:/tmp/code# mamba activate paddle

0 examples ran in 0.0009 seconds
root@j7ba948ec6f7425190a818336fcd0045-task0-0:/tmp/code# python
Python 3.10.11 (main, Sep 12 2023, 07:11:29) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

現(xiàn)在我找不到虛擬環(huán)境的位置 .好吧,這個0 examples ran in 0.0009 seconds 

好像也不算運行成功??!

安裝飛槳

mamba好像沒裝成

pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple 

最后是這個完成的:

python -m pip install paddlepaddle==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/

測試:

root@j7ba948ec6f7425190a818336fcd0045-task0-0:/tmp/code# python 
Python 3.10.11 (main, Sep 12 2023, 07:11:29) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
import >>> import paddle
/usr/local/lib/python3.10/site-packages/paddle/utils/cpp_extension/extension_utils.py:711: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md
  warnings.warn(warning_message)
>>> x= paddle.to_tensor((1,2))
>>> y = x+1
>>> y
Tensor(shape=[2], dtype=int64, place=Place(cpu), stop_gradient=True,
       [2, 3])
>>> paddle.utils.run_check()
Running verify PaddlePaddle program ... 
I0621 15:01:31.758841   374 pir_interpreter.cc:1541] New Executor is Running ...
I0621 15:01:31.759274   374 pir_interpreter.cc:1564] pir interpreter is running by multi-thread mode ...
PaddlePaddle works well on 1 CPU.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.

其它安裝方法安裝飛槳

老的安裝方法是成功的

python -m pip install paddlepaddle==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/

./micromamba-linux-64  create -n paddle python=3.10

使用包管理器mamba安裝torch

mamba create -n torchmd python=3.10
mamba activate torchmd
mamba install pytorch python=3.10 -c conda-forge
mamba install moleculekit parmed jupyter -c acellera -c conda-forge # For running the examples
pip install torchmd

mamba create -n torchmd
mamba activate torchmd
mamba install pytorch python=3.10 -c conda-forge
mamba install moleculekit parmed jupyter -c acellera -c conda-forge # For running the examples
pip install torchmd

mamba create -n torchmd
mamba activate torchmd
mamba install paddlepaddle python=3.10 -c conda-forge
mamba install moleculekit parmed jupyter -c acellera -c conda-forge # For running the examples
pip install torchmd

效果并不太好,就先到這里吧

到此這篇關(guān)于新一代python包管理軟件mamba的使用的文章就介紹到這了,更多相關(guān)python包管理軟件mamba內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • Python中Requests庫的實現(xiàn)示例

    Python中Requests庫的實現(xiàn)示例

    Requests是Python生態(tài)中最廣泛使用的HTTP客戶端庫,本文主要介紹了Python中Requests庫的實現(xiàn)示例,具有一定的參考價值,感興趣的可以了解一下
    2025-05-05
  • python交易記錄鏈的實現(xiàn)過程詳解

    python交易記錄鏈的實現(xiàn)過程詳解

    這篇文章主要介紹了python交易記錄鏈的實現(xiàn)過程詳解,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下
    2019-07-07
  • Python之reload流程實例代碼解析

    Python之reload流程實例代碼解析

    這篇文章主要介紹了Python之reload流程實例代碼解析,分享了相關(guān)代碼示例,小編覺得還是挺不錯的,具有一定借鑒價值,需要的朋友可以參考下
    2018-01-01
  • 詳解Python中namedtuple的使用

    詳解Python中namedtuple的使用

    這篇文章主要介紹了Python中namedtuple的使用,本文通過實例代碼給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2020-04-04
  • OFD格式文件及如何適應(yīng)Python將PDF轉(zhuǎn)換為OFD格式文件

    OFD格式文件及如何適應(yīng)Python將PDF轉(zhuǎn)換為OFD格式文件

    OFD是中國自主研發(fā)的一種固定版式文檔格式,主要用于電子公文、檔案管理等領(lǐng)域,這篇文章主要介紹了OFD格式文件及如何適應(yīng)Python將PDF轉(zhuǎn)換為OFD格式文件的相關(guān)資料,文中通過代碼介紹的非常詳細(xì),需要的朋友可以參考下
    2025-11-11
  • Python3網(wǎng)絡(luò)爬蟲開發(fā)實戰(zhàn)之極驗滑動驗證碼的識別

    Python3網(wǎng)絡(luò)爬蟲開發(fā)實戰(zhàn)之極驗滑動驗證碼的識別

    本節(jié)我們的目標(biāo)是用程序來識別并通過極驗驗證碼的驗證,其步驟有分析識別思路、識別缺口位置、生成滑塊拖動路徑,最后模擬實現(xiàn)滑塊拼合通過驗證。需要的朋友可以參考下
    2019-08-08
  • 利用python繪制動態(tài)圣誕下雪圖

    利用python繪制動態(tài)圣誕下雪圖

    圣誕節(jié)快到了,給你最愛的人送上一顆python動態(tài)圣誕下雪圖吧,所以今天小編給大家介紹了如何利用python繪制動態(tài)圣誕下雪圖,文中有詳細(xì)的代碼示例,需要的朋友可以參考下
    2023-12-12
  • Python實現(xiàn)讀取文件的方法總結(jié)

    Python實現(xiàn)讀取文件的方法總結(jié)

    這篇文章主要為大家詳細(xì)介紹了Python中實現(xiàn)讀取文件效果的幾種方法總結(jié),文中的示例代碼講解詳細(xì),感興趣的小伙伴可以了解一下
    2022-09-09
  • json跨域調(diào)用python的方法詳解

    json跨域調(diào)用python的方法詳解

    這篇文章主要介紹了json跨域調(diào)用python的方法,結(jié)合實例形式分析了基于ajax的json調(diào)用及Python后臺處理技巧,具有一定參考借鑒價值,需要的朋友可以參考下
    2017-01-01
  • Python 字典dict使用介紹

    Python 字典dict使用介紹

    這篇文章主要介紹了Python 字典dict使用介紹,需要的朋友可以參考下
    2014-11-11

最新評論

鄂伦春自治旗| 宣城市| 清新县| 高雄市| 娱乐| 萍乡市| 文安县| 赣州市| 肥乡县| 澎湖县| 巴马| 报价| 广水市| 甘孜| 苏尼特左旗| 荥阳市| 桓台县| 江源县| 怀柔区| 丰镇市| 蓬溪县| 鹤壁市| 沛县| 赞皇县| 团风县| 固镇县| 河西区| 沙洋县| 承德市| 长沙市| 荔波县| 池州市| 揭西县| 泾源县| 饶平县| 景洪市| 进贤县| 尼玛县| 绥芬河市| 两当县| 徐州市|