复现论文时遇到这个问题:
安装论文要求的安装包时遇到这个错误
setup.py代码为:
"""The setup sript for the torchprune package."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import setuptools
with open("README.md", "r") as fh:
LONG_DESCRIPTION = fh.read()
setuptools.setup(
name="torchprune",
version="2.0.0",
author="The torchprune authors",
author_email="lucasl@mit.edu",
description="Pytorch-based pruning for efficient neural networks",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
licence="MIT Licence",
url="https://github.com/lucaslie/torchprune",
install_requires=[
"cvxpy",
"h5py",
"imagecorruptions",
"Mosek",
"numpy",
"opencv-python",
"pyyaml",
"requests",
"scikit-learn",
"scikit-image",
"sentencepiece",
"torch",
"torchvision",
"tensorboard",
"torchdyn==1.0.1",
"protobuf",
"wand",
"transformers @ git+https://github.com/huggingface/transformers.git",
"datasets @ git+https://github.com/huggingface/datasets.git",
],
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Intended Audience :: Science/Research",
],
python_requires=">=3.6,<3.9",
)
原作者要求python3.8
我更改过python环境
重装过torch防止一开始不对应
但是还是有下面这个问题
