微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Pip 包 (pendulum 2.1) 无法安装 FileNotFoundError

如何解决Pip 包 (pendulum 2.1) 无法安装 FileNotFoundError

在 pendulum 的安装过程中,出现 FileNotFoundError 异常。

我多次运行它,但都失败了。它确实适用于 pendulum==2.1.1

Collecting pendulum==2.1.2 (from -c https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-3.6.txt (line 354))
  Using cached https://files.pythonhosted.org/packages/db/15/6e89ae7cde7907118769ed3d2481566d05b5fd362724025198bb95faf599/pendulum-2.1.2.tar.gz
  Installing build dependencies ... done
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>",line 1,in <module>
      File "/Users/jorricks/.pyenv/versions/3.6.13/lib/python3.6/tokenize.py",line 452,in open
        buffer = _builtin_open(filename,'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/7s/k78t7hcx6g75x9jg8wmj13z40000gn/T/pip-install-xuv35z0w/pendulum/setup.py'
    
    ----------------------------------------
Command "python setup.py egg_info" Failed with error code 1 in /private/var/folders/7s/k78t7hcx6g75x9jg8wmj13z40000gn/T/pip-install-xuv35z0w/pendulum/
You are using pip version 18.1,however version 21.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
~/Projects/airflow ~/Projects/airflow
#######################################################################
  You had some troubles installing the venv !!!!!
  Try running the command below and rerun virtualenv installation

  brew install sqlite MysqL postgresql openssl
  export LDFLAGS="-L/usr/local/opt/openssl/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl/include"

#######################################################################

ERROR: The prevIoUs step completed with error. Please take a look at output above 

解决方法

错误与 pip 版本有关。

只需使用 pip install --upgrade pip 更新 pip,我就解决了我的问题。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。