Command “python setup.py egg

it2026-01-21  8

在执行"pip install Augmentor"命令时,遇到以下错误:

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-q_eqh7d5/Pillow/

具体报错提示为:

tyb@amax:~/.conda/envs/pytorch$ pip install Augmentor Collecting Augmentor Using cached https://files.pythonhosted.org/packages/cb/79/861f38d5830cff631e30e33b127076bfef8ac98171e51daa06df0118c75f/Augmentor-0.2.8-py2.py3-none-any.whl Collecting Pillow>=5.2.0 (from Augmentor) Using cached https://files.pythonhosted.org/packages/74/15/93be74c3124ad183ea3f25251a66d3c7f8641065537973c276e81f703a0b/Pillow-8.0.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-q_eqh7d5/Pillow/setup.py", line 42 f"Pillow {PILLOW_VERSION} does not support Python " ^ SyntaxError: invalid syntax ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-q_eqh7d5/Pillow/ You are using pip version 8.1.2, however version 20.2.4 is available. You should consider upgrading via the 'pip install --upgrade pip' command. tyb@amax:~/.conda/envs/pytorch$

解决方法,更新pip,执行以下命令:

pip install --upgrade pip

然后在执行命令"pip install Augmentor",成功!

tyb@amax:~/.conda/envs/pytorch$ pip install Augmentor DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality. Defaulting to user installation because normal site-packages is not writeable Collecting Augmentor Using cached Augmentor-0.2.8-py2.py3-none-any.whl (38 kB) Processing /home/tyb/.cache/pip/wheels/8b/99/a0/81daf51dcd359a9377b110a8a886b3895921802d2fc1b2397e/future-0.18.2-cp35-none-any.whl Collecting tqdm>=4.9.0 Using cached tqdm-4.50.2-py2.py3-none-any.whl (70 kB) Requirement already satisfied: numpy>=1.11.0 in /home/tyb/anaconda3/lib/python3.5/site-packages (from Augmentor) (1.11.1) Collecting Pillow>=5.2.0 Using cached Pillow-7.2.0-cp35-cp35m-manylinux1_x86_64.whl (2.2 MB) Installing collected packages: future, tqdm, Pillow, Augmentor WARNING: The scripts futurize and pasteurize are installed in '/home/tyb/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script tqdm is installed in '/home/tyb/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed Augmentor-0.2.8 Pillow-7.2.0 future-0.18.2 tqdm-4.50.2
最新回复(0)