出于我的目的,我需要 Google Colab 中的 osmNX
以前有人这样做过吗?我使用以下命令:
!wget https://repo.anaconda.com/archive/Anaconda3-2019.07-Linux-x86_64.sh && bash Anaconda3-2019.07-Linux-x86_64.sh -bfp /usr/local
import sys
sys.path.append('/usr/local/lib/python3.6/site-packages')
!conda config --prepend channels conda-forge
命令:
!conda info --envs
表明环境创建成功。
当我运行命令时:
!conda activate ox
显示错误:
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
命令
!conda init bash
没有影响。
谢谢您的帮助
!apt-get -qq install -y libspatialindex-dev && pip install -q -U osmnx
将 osmnx 导入为 ox
ox.config(use_cache=True, log_console=True)
你可以使用这个命令!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)