zoukankan      html  css  js  c++  java
  • Django虚拟环境创建问题virtualenvwrapper.sh: There was a problem running the initialization hooks.

    virtualenvwrapper.sh: There was a problem running the initialization hooks.

    virtualenvwrapper.sh: There was a problem running the initialization hooks. If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenvwrapper has been installed for VIRTUALENVWRAPPER_PYTHON= and that PATH is set properly.错误
    1、在ubuntu中安装虚拟环境时,刷新.basnrc时出现上述错误。

    这是因为ubuntu安装了只有3.x版本的python,在安装时使用的是sudo pip3 install
    virtualenvwrapper在我运行的时候默认使用的是python2.x,但在python2.x中不存在对应的模块。

    2、修改virtualenvwrapper.sh文件,将框内的python改为python3。

    sudo gedit /usr/local/bin/virtualenvwrapper.sh

    改成python3

     

    3、重新刷新家目录下的.bashrc。

    source .bashrc

    4、成功解决。

  • 相关阅读:
    netty ByteToMessageDecoder 分析
    netty 编/解码处理
    MAC 入门
    netty 学习
    php ioc and web rest design
    spring 启动流程
    淘宝美衣人
    ecslipe cdt lib link
    阿里巴巴中间件团队招人了!
    架构师速成-架构目标之伸缩性安全性
  • 原文地址:https://www.cnblogs.com/sewen-H/p/13233528.html
Copyright © 2011-2022 走看看