我正在尝试运行一个执行少量API调用和Kafka逻辑的python脚本,但却出现以下错误:
public valueMapper = (key) => {
let selection = this.enumeration.find(e => e.key === key);
if (selection)
return selection.value;
};
尝试dyld: Library not loaded: @executable_path/../.Python
以及Python2和Python3,但仍然得到相同的错误
可能是什么原因以及如何解决它?
答案 0 :(得分:3)
嗨我在brew升级后也遇到了这个问题,我用delete virtualenv解决了
find myvirtualenv -type l -delete
然后重新创建virtualenv
virtualenv myvirtualenv
参考:
http://www.jeremycade.com/python/osx/homebrew/2015/03/02/fixing-virtualenv-after-a-python-upgrade/
答案 1 :(得分:0)
The issue is related to hombrew Python installs/upgrade。
任何使用pipenv(您应该使用!)的人都可以简单地使用这两个命令-无需激活venv:
rm -rf `pipenv --venv` # remove the broken venv
pipenv install --dev # reinstall the venv from pipfile