本文介绍了“没有这样的文件:'requirements.txt'错误"在安装Quartz模块时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用pip install Quartz在系统上安装Quartz时,遇到以下错误.我将Mac OSX与Anaconda一起使用.感谢您的帮助.

When I try to install Quartz on my system using pip install Quartz, I face with the following error. I use Mac OSX with Anaconda. Any help is appreciated.

Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/sb/llj7h5px227_5b0__3v0sw5r0000gn/T/pip-build-qf8ezbu5/Quartz/setup.py", line 35, in <module>
    install_requires=read_dependencies("requirements.txt"),
  File "/private/var/folders/sb/llj7h5px227_5b0__3v0sw5r0000gn/T/pip-build-qf8ezbu5/Quartz/setup.py", line 7, in read_dependencies
    with open(req_file) as req:
FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'

推荐答案

该软件包的setup.py中似乎存在一个错误,因此我尝试了以下操作:

There seems to be a bug in the setup.py of the package, so I tried the following:

  1. 运行:pip download quartz.
  2. 找到下载的quartz-0.0.1.dev0.tar.gz.
  3. 提取并在setup.py中找到以下行

  1. Run: pip download quartz.
  2. Find the downloaded quartz-0.0.1.dev0.tar.gz.
  3. Extract and in setup.py find the following line

install_requires=read_dependencies("requirements.txt")

并将其更改为:

install_requires=read_dependencies("quartz.egg-info/requires.txt")

  • 运行:pip install -e /path/to/quartz-0.0.1.dev0.

    应该完成安装而不会出现错误.

    Setup should be completed w/o errors.

    或者尝试此操作(它可以修复ImportError:安装pyautogui时遇到的名为'Quartz'的模块,我在安装pyautogui时遇到的问题):

    Alternatively try this (which fixes ImportError: No module named 'Quartz' when installing pyautogui I encountered when installing pyautogui):

    1. pip install pyobjc-core
    2. pip install pyobjc-framework-Quartz
    1. pip install pyobjc-core
    2. pip install pyobjc-framework-Quartz

    这篇关于“没有这样的文件:'requirements.txt'错误"在安装Quartz模块时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

  • 08-23 23:59