折腾:
【未解决】Mac中pipenv安装报错:Could not find a version that matches pandas
期间,升级了python后,找不到pipenv了:
pipenv --rm /usr/local/Cellar/pyenv/1.2.26/libexec/pyenv-exec: /usr/local/bin/pipenv: /usr/local/opt/python/bin/python3.7: bad interpreter: No such file or directory /usr/local/Cellar/pyenv/1.2.26/libexec/pyenv-exec: line 48: /usr/local/bin/pipenv: Undefined error: 0
pipenv用起来报错了
去看看:
which pipenv /Users/crifan/.pyenv/shims/pipenv
是有的
pipenv --version /usr/local/Cellar/pyenv/1.2.26/libexec/pyenv-exec: /usr/local/bin/pipenv: /usr/local/opt/python/bin/python3.7: bad interpreter: No such file or directory /usr/local/Cellar/pyenv/1.2.26/libexec/pyenv-exec: line 48: /usr/local/bin/pipenv: Undefined error: 0
找不到
注意到是 升级之前的python版本:3.7的
那去安装试试?
which pip pip: aliased to noglob pip crifan@licrifandeMacBook-Pro ~/dev/dev_root/projects/团队业绩统计/TeamSaleStatistic pip --version pip 20.2.3 from /Users/crifan/.pyenv/versions/3.9.4/lib/python3.9/site-packages/pip (python 3.9)
有pip。用pip去安装试试
pip install pipenv Looking in indexes: http://mirrors.aliyun.com/pypi/simple/ Collecting pipenv Downloading http://mirrors.aliyun.com/pypi/packages/c1/a3/d266421362565864f130cb97f55f70c763b843c9a67311d215d75b7ec464/pipenv-2021.5.29-py2.py3-none-any.whl (3.9 MB) |████████████████████████████████| 3.9 MB 1.9 MB/s Collecting virtualenv-clone>=0.2.5 Downloading http://mirrors.aliyun.com/pypi/packages/83/b8/cd931487d250565392c39409117436d910232c8a3ac09ea2fb62a6c47bff/virtualenv_clone-0.5.4-py2.py3-none-any.whl (6.6 kB) Requirement already satisfied: setuptools>=36.2.1 in /Users/crifan/.pyenv/versions/3.9.4/lib/python3.9/site-packages (from pipenv) (49.2.1) Requirement already satisfied: pip>=18.0 in /Users/crifan/.pyenv/versions/3.9.4/lib/python3.9/site-packages (from pipenv) (20.2.3) Collecting virtualenv Downloading http://mirrors.aliyun.com/pypi/packages/03/08/f819421002e85a71d58368f7bffbe0b1921325e0e8ca7857cb5fb0e1f7c1/virtualenv-20.4.7-py2.py3-none-any.whl (7.2 MB) |████████████████████████████████| 7.2 MB 2.1 MB/s Collecting certifi Downloading http://mirrors.aliyun.com/pypi/packages/05/1b/0a0dece0e8aa492a6ec9e4ad2fe366b511558cdc73fd3abc82ba7348e875/certifi-2021.5.30-py2.py3-none-any.whl (145 kB) |████████████████████████████████| 145 kB 2.1 MB/s Collecting filelock<4,>=3.0.0 Downloading http://mirrors.aliyun.com/pypi/packages/93/83/71a2ee6158bb9f39a90c0dea1637f81d5eef866e188e1971a1b1ab01a35a/filelock-3.0.12-py3-none-any.whl (7.6 kB) Collecting six<2,>=1.9.0 Downloading http://mirrors.aliyun.com/pypi/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting distlib<1,>=0.3.1 Downloading http://mirrors.aliyun.com/pypi/packages/87/26/f6a23dd3e578132cf924e0dd5d4e055af0cd4ab43e2a9f10b7568bfb39d9/distlib-0.3.2-py2.py3-none-any.whl (338 kB) |████████████████████████████████| 338 kB 2.1 MB/s Collecting appdirs<2,>=1.4.3 Downloading http://mirrors.aliyun.com/pypi/packages/3b/00/2344469e2084fb287c2e0b57b72910309874c3245463acd6cf5e3db69324/appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB) Installing collected packages: virtualenv-clone, filelock, six, distlib, appdirs, virtualenv, certifi, pipenv Successfully installed appdirs-1.4.4 certifi-2021.5.30 distlib-0.3.2 filelock-3.0.12 pipenv-2021.5.29 six-1.16.0 virtualenv-20.4.7 virtualenv-clone-0.5.4 WARNING: You are using pip version 20.2.3; however, version 21.1.2 is available. You should consider upgrading via the '/Users/crifan/.pyenv/versions/3.9.4/bin/python3.9 -m pip install --upgrade pip' command. crifan@licrifandeMacBook-Pro ~/dev/dev_root/projects/团队业绩统计/TeamSaleStatistic
然后:
crifan@licrifandeMacBook-Pro ~/dev/dev_root/projects/团队业绩统计/TeamSaleStatistic which pipenv /Users/crifan/.pyenv/shims/pipenv crifan@licrifandeMacBook-Pro ~/dev/dev_root/projects/团队业绩统计/TeamSaleStatistic pipenv --version pipenv, version 2021.5.29
确定是可以有pipenv
顺带再去升级pip:
pip install --upgrade pip Looking in indexes: http://mirrors.aliyun.com/pypi/simple/ Collecting pip Downloading http://mirrors.aliyun.com/pypi/packages/cd/82/04e9aaf603fdbaecb4323b9e723f13c92c245f6ab2902195c53987848c78/pip-21.1.2-py3-none-any.whl (1.5 MB) |████████████████████████████████| 1.5 MB 1.9 MB/s Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 20.2.3 Uninstalling pip-20.2.3: Successfully uninstalled pip-20.2.3 Successfully installed pip-21.1.2
【总结】
如此,用pip去安装了pipenv:
pip install pipenv
即可用上pipenv了。