Jupyter 笔记本环境中出现“/bin/bash: wget: command not found”错误

问题描述 投票:0回答:1

我主要使用Google Colab,但是Google Colab有支付问题,所以昨天我尝试在Jupyter Notebook中运行100%相同的代码。

我的代码是:

!pip install --upgrade mxnet
!pip install --upgrade gluoncv
!pip uninstall -y torch torchvision torchaudio torchtext

当我尝试安装 wget 时,就像这样,

!wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz
!tar -xvfz Python-3.8.5.tgz
!Python-3.8.5/configure
!make
!sudo make install

出现此错误。

/bin/bash: wget: command not found tar: Error opening archive: Failed to open 'z' /bin/bash: Python-3.8.5/configure: No such file or directory xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun Password:

我不明白为什么它不起作用。

如何修复此错误?如果有人知道请帮忙。

python python-3.x jupyter-notebook wget tar
1个回答
0
投票

如果您使用的是 MacOS,请尝试以下步骤:

xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install wget

然后

wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz
tar -xzvf Python-3.8.5.tgz

终于

cd Python-3.8.5
./configure
make
sudo make install
© www.soinside.com 2019 - 2024. All rights reserved.