看来Mac上的pipenv和其他python软件包与Python 3.6绑定在一起,但在3.7上应该可以正常工作。我最近通过
更新为python
brew upgrade python
运行3.7.0
$ pipenv更新 警告:在您的系统上找不到Python 3.6… 您可以使用以下命令指定特定版本的Python: $ pipenv --python路径/到/ python
当我尝试指定路径时...我得到:
``` $ pipenv --python 3.7更新 为此项目创建一个virtualenv… Pipfile:/ Users / zane / src / dinghy-ping / Pipfile 使用/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/bin/python3.7(3.7.0)创建virtualenv… with使用解释器/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/bin/python3.7运行virtualenv 使用基本前缀'/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7' /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/virtualenv.py:1041:DeprecationWarning:不建议使用imp模块,而要使用importlib;请参阅该模块的文档以供其他使用 进口商品 /Users/zane/.local/share/virtualenvs/dinghy-ping-ePAjWOtt/bin/python3.7中的新python可执行文件 不覆盖现有的python脚本/Users/zane/.local/share/virtualenvs/dinghy-ping-ePAjWOtt/bin/python(您必须使用/Users/zane/.local/share/virtualenvs/dinghy-ping-ePAjWOtt/bin/ python3.7) 请确保从/Users/zane/.pydistutils.cfg文件中删除所有以前的自定义路径。 安装setuptools,pip,wheel ... 来自命令/Users/zane/.local/s...AjWOtt/bin/python3.7-setuptools pip wheel的完整输出: 在链接中查看:/usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages、/usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/ site-packages / virtualenv_support,/ Users / zane / Library / Python / 3.7 / lib / python / site-packages / virtualenv_support 收集安装工具 使用缓存的https://files.pythonhosted.org/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl 收集点 使用缓存的https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl 收集轮 使用缓存的https://files.pythonhosted.org/packages/5a/9b/6aebe9e2636d35d1a93772fa644c828303e1d5d124e8a88f156f42ac4b87/wheel-0.32.2-py2.py3-none-any.whl 安装收集的软件包:setuptools,pip,wheel 由于环境错误而无法安装软件包:[Errno 1]不允许的操作:'/ bin / easy_install'
...安装setuptools,pip,wheel ...完成。 追溯(最近一次通话): 在以下位置输入文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/virtualenv.py” 主要() 主目录中的文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/virtualenv.py” symlink = options.symlink) 在create_environment的第947行中,文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/virtualenv.py” download =下载, 在install_wheel中的文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/virtualenv.py”,第904行 call_subprocess(cmd,show_stdout = False,extra_env = env,stdin = SCRIPT) 在call_subprocess中的第796行中,文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/virtualenv.py” %(cmd_desc,过程返回码) OSError:命令/Users/zane/.local/s...AjWOtt/bin/python3.7-setuptools pip wheel失败,错误代码为1 ```
``` 追溯(最近一次通话): 在第11行的文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/bin/pipenv” load_entry_point('pipenv == 2018.10.13','console_scripts','pipenv')() 调用中的“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/vendor/click/core.py”行764 返回self.main(* args,** kwargs) 主目录中的文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/vendor/click/core.py”,第717行 rv = self.invoke(ctx) 调用中的文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/vendor/click/core.py”,行1134 Command.invoke(self,ctx) 调用中的文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/vendor/click/core.py”,行956 返回ctx.invoke(self.callback,** ctx.params) 调用中的文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/vendor/click/core.py”,行555 返回回调(* args,** kwargs) 文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py”,第64行,在new_func中 返回ctx.invoke(f,obj,* args,** kwargs) 调用中的文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/vendor/click/core.py”,行555 返回回调(* args,** kwargs) 文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py”在new_func的第17行 返回f(get_current_context(),* args,** kwargs) cli中的第203行的文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/cli/command.py” clear = state.clear, 确保文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/core.py”,行565 pypi_mirror = pypi_mirror, 确保文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/core.py”,行500,在sure_virtualenv中 python = python,site_packages = site_packages,pypi_mirror = pypi_mirror do_create_virtualenv中的第901行的文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/core.py” click.echo(crayons.blue(“ {0}”。format(c.err)),err = True)文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site -packages / pipenv / vendor / delegator.py“,第146行,在err中 返回self._pexpect_out _pexpect_out中的第114行,文件“ /usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/vendor/delegator.py” 结果+ = self.subprocess.after TypeError:只能将str(而非“ type”)连接到str
```
问题似乎出在:
Installing collected packages: setuptools, pip, wheel
Could not install packages due to an EnvironmentError: [Errno 1] Operation not permitted: '/bin/easy_install'