无法在bash配置文件中正确设置virtualenvwrapper

问题描述

我已经使用pip在centos 7中安装了Virtualenvwrapper,但是我无法正确设置bash_profile。当我获取bash_profile时,它会中断。我能够运行mkvirtualenv或workon之类的命令。

我引用了其他类似的questions,说是要导出相关的python解释器。

export const checkMaximumChildren = (hierarchy,maximum) => {
    let hasMoreThanMaximumChildren = false;

    if (hierarchy.children.length > maximum) {
        hasMoreThanMaximumChildren = true;
    } else {
        const dmaExtractor = (children) => {
            children.forEach((child) => {
                if (child.children.length > maximum) {
                    hasMoreThanMaximumChildren = true;
                    return hasMoreThanMaximumChildren;
                }

                if (
                    child &&
                    child.children &&
                    Array.isArray(child.children) &&
                    child.children.length > 0
                ) {
                    dmaExtractor(data.children);
                }
            });
        };

        if (
            hierarchy &&
            hierarchy.children &&
            Array.isArray(hierarchy.children) &&
            data.children.length > 0
        ) {
            dmaExtractor(hierarchy.children);
        }
    }

    return hasMoreThanMaximumChildren;
};

 const data =  [{
    "id": 1,"parentId": null,"selected": false,"children": [{
        "id": 2,"parentId": 1,"children": [{
            "id": 3,"parentId": 2,"children": [{
                "id": 4,"parentId": 3,"children": []
            }]
        }]
    }]
 },{
    "id": 1,"selected": true,"children": []
 },"children": []
 }]

输出

source ~/.bash_profile

我的bash_profile conf

bash: tty: command not found...
Similar command is: 'tty'
/usr/libexec/grepconf.sh: line 5: grep: command not found
bash: grep: command not found...
bash: egrep: command not found...
Similar command is: 'grep'
bash: mkdir: command not found...
bash: mktemp: command not found...
bash: touch: command not found...
ERROR: virtualenvwrapper Could not create a temporary file name.
bash: grep: command not found...
bash: egrep: command not found...
Similar command is: 'grep'
bash: mkdir: command not found...
bash: mktemp: command not found...
bash: touch: command not found...
ERROR: virtualenvwrapper Could not create a temporary file name.
bash: sed: command not found...

“哪个virtualenvwrapper.sh”的输出

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin
alias python=python3.6
alias pip=pip3.6

export PATH
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.el7_7.x86_64/jre/
export JRE_HOME=/usr/lib/jvm/jre-1.8.0-openjdk-1.8.0.232.b09-0.el7_7.x86_64
#export PATH=$HOME/anaconda3/bin:$PATH

export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3.6
export WORKON_HOME=$HOME/.virtualenvs
source /usr/bin/virtualenvwrapper.sh

但它位于“ /usr/bin/virtualenvwrapper.sh”中

当我打开新的bash shell时发出警告

/bin/virtualenvwrapper.sh

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)