无效要求

问题描述

我用下面的方法将我的项目需求转换成txt文件

pip freeze > requirements.txt

我尝试用下面的代码加载生成的txt文件来测试它,但我收到了以下错误。我该如何解决这个问题。

python -m pip install -r requirements.txt


Usage: pip [options]

ERROR: Invalid requirement: -andas @ file:///C:/ci/pandas_1592833613419/work
pip: error: no such option: -a


-andas @ file:///C:/ci/pandas_1592833613419/work
absl-py==0.11.0
alabaster==0.7.12
anaconda-client==1.7.2
anaconda-navigator==1.9.12
anaconda-project==0.8.3
argh==0.26.2
asn1crypto==1.3.0
astroid @ file:///C:/ci/astroid_1592487315634/work
astropy==4.0.1.post1
astunparse==1.6.3
atomicwrites==1.4.0
attrs==19.3.0
autopep8 @ file:///tmp/build/80754af9/autopep8_1592412889138/work
Babel==2.8.0
backcall==0.2.0
backports.functools-lru-cache==1.6.1
backports.shutil-get-terminal-size==1.0.0
backports.tempfile==1.0
backports.weakref==1.0.post1
bcrypt==3.1.7
beautifulsoup4==4.9.1
bitarray @ file:///C:/ci/bitarray_1594751093906/work
bkcharts==0.2
bleach==3.1.5
bokeh @ file:///C:/ci/bokeh_1593178781838/work
boto==2.49.0
Bottleneck==1.3.2
bower==0.0.0
brotlipy==0.7.0
cachetools==4.1.1
certifi==2020.6.20
cffi==1.14.0
chardet==3.0.4
click==7.1.2
cloudpickle @ file:///tmp/build/80754af9/cloudpickle_1594141588948/work
clyent==1.2.2
colorama==0.4.3
comtypes==1.1.7
conda==4.8.3
conda-build==3.18.11
conda-package-handling==1.7.0
conda-verify==3.4.2
contextlib2==0.6.0.post1
cryptography==2.9.2
cycler==0.10.0
Cython==0.29.14
cytoolz==0.10.1
dask @ file:///tmp/build/80754af9/dask-core_1594156306305/work
decorator==4.4.2
defusedxml==0.6.0
diff-match-patch @ file:///tmp/build/80754af9/diff-match-patch_1594828741838/work
distributed @ file:///C:/ci/distributed_1594742844291/work
docutils==0.16
entrypoints==0.3
et-xmlfile==1.0.1
fastcache==1.1.0
filelock==3.0.12
Flake8==3.8.3
Flask==1.1.2
fsspec==0.7.4
future==0.18.2
gast==0.3.3
gensim==3.8.3
gevent @ file:///C:/ci/gevent_1593005471151/work
glob2==0.7
gmpy2==2.0.8
google-auth==1.23.0
google-auth-oauthlib==0.4.2
google-pasta==0.2.0
greenlet==0.4.16
grpcio==1.33.2
h5py==2.10.0
HeapDict==1.0.1
html5lib @ file:///tmp/build/80754af9/html5lib_1593446221756/work
idna @ file:///tmp/build/80754af9/idna_1593446292537/work
imageio @ file:///tmp/build/80754af9/imageio_1594161405741/work
imagesize==1.2.0
importlib-Metadata @ file:///C:/ci/importlib-Metadata_1593446511143/work
intervaltree @ file:///tmp/build/80754af9/intervaltree_1594361675072/work
ipykernel @ file:///C:/ci/ipykernel_1594745408489/work/dist/ipykernel-5.3.2-py3-none-any.whl
ipython @ file:///C:/ci/ipython_1593447482397/work
ipython-genutils==0.2.0
ipywidgets==7.5.1
isort==4.3.21
itsdangerous==1.1.0
jdcal==1.4.1
jedi @ file:///C:/ci/jedi_1592833825077/work
Jinja2==2.11.2
joblib @ file:///tmp/build/80754af9/joblib_1594236160679/work
json5==0.9.5
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client @ file:///tmp/build/80754af9/jupyter_client_1594826976318/work
jupyter-console==6.1.0
jupyter-core==4.6.3
jupyterlab==2.1.5
jupyterlab-server @ file:///tmp/build/80754af9/jupyterlab_server_1594164409481/work
Keras==2.4.3
Keras-Preprocessing==1.1.2
keyring @ file:///C:/ci/keyring_1593109799227/work
kiwisolver==1.2.0
lazy-object-proxy==1.4.3
libarchive-c==2.9
llvmlite==0.33.0+1.g022ab0f
locket==0.2.0
lxml @ file:///C:/ci/lxml_1594822774489/work
Markdown==3.3.3
MarkupSafe==1.1.1
matplotlib @ file:///C:/ci/matplotlib-base_1592837548929/work
mccabe==0.6.1
menuinst==1.4.16
mistune==0.8.4
mkl-fft==1.1.0
mkl-random==1.1.1
mkl-service==2.3.0
mock==4.0.2
more-itertools==8.4.0
mpmath==1.1.0
msgpack==1.0.0
multipledispatch==0.6.0
navigator-updater==0.2.1
nbconvert==5.6.1
nbformat==5.0.7
networkx @ file:///tmp/build/80754af9/networkx_1594377231366/work
nltk @ file:///tmp/build/80754af9/nltk_1592496090529/work
nose==1.3.7
notebook==6.0.3
npm==0.1.1
numba==0.50.1
numexpr==2.7.1
numpy==1.18.5
numpydoc @ file:///tmp/build/80754af9/numpydoc_1594166760263/work
oauthlib==3.1.0
olefile==0.46
openpyxl @ file:///tmp/build/80754af9/openpyxl_1594167385094/work
opt-einsum==3.3.0
optional-django==0.1.0
packaging==20.4
pandas @ file:///C:/ci/pandas_1592833613419/work
pandocfilters==1.4.2
paramiko==2.7.1
parso==0.7.0
partd==1.1.0
path==13.1.0
pathlib2==2.3.5
pathtools==0.1.2
patsy==0.5.1
pep8==1.7.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow @ file:///C:/ci/pillow_1594298230227/work
pkginfo==1.5.0.1
pluggy==0.13.1
ply==3.11
prometheus-client==0.8.0
prompt-toolkit==3.0.5
protobuf==3.14.0
psutil==5.7.0
py @ file:///tmp/build/80754af9/py_1593446248552/work
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle==2.6.0
pycosat==0.6.3
pycparser @ file:///tmp/build/80754af9/pycparser_1594388511720/work
pycurl==7.43.0.5
pydocstyle @ file:///tmp/build/80754af9/pydocstyle_1592848020240/work
pyflakes==2.2.0
Pygments==2.6.1
pylint @ file:///C:/ci/pylint_1592482039483/work
pynacl @ file:///C:/ci/pynacl_1595000047588/work
pyodbc===4.0.0-unsupported
pyOpenSSL @ file:///tmp/build/80754af9/pyopenssl_1594392929924/work
pyparsing==2.4.7
pyperclip==1.8.1
pyreadline==2.1
pyrsistent==0.16.0
PySocks==1.7.1
pytest==5.4.3
python-dateutil==2.8.1
python-jsonrpc-server @ file:///tmp/build/80754af9/python-jsonrpc-server_1594397536060/work
python-language-server @ file:///C:/ci/python-language-server_1594162130238/work
pytz==2020.1
PyWavelets==1.1.1
pywin32==227
pywin32-ctypes==0.2.0
pywinpty==0.5.7
PyYAML==5.3.1
pyzmq==19.0.1
QDarkStyle==2.8.1
QtAwesome==0.7.2
qtconsole @ file:///tmp/build/80754af9/qtconsole_1592848611704/work
qtpy==1.9.0
regex @ file:///C:/ci/regex_1593419644658/work
requests @ file:///tmp/build/80754af9/requests_1592841827918/work
requests-oauthlib==1.3.0
rope==0.17.0
rsa==4.6
Rtree==0.9.4
ruamel-yaml==0.15.87
scikit-image==0.16.2
scikit-learn @ file:///C:/ci/scikit-learn_1592853510272/work
scipy @ file:///C:/ci/scipy_1592916963468/work
seaborn==0.10.1
Send2Trash==1.5.0
simplegeneric==0.8.1
singledispatch==3.4.0.3
sip==4.19.13
six==1.15.0
smart-open==4.1.2
snips==1.0.0
snowballstemmer==2.0.0
sortedcollections==1.2.1
sortedcontainers==2.2.2
soupsieve==2.0.1
Sphinx @ file:///tmp/build/80754af9/sphinx_1594223420021/work
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
sphinxcontrib-websupport @ file:///tmp/build/80754af9/sphinxcontrib-websupport_1593446360927/work
spyder @ file:///C:/ci/spyder_1594830825244/work
spyder-kernels @ file:///C:/ci/spyder-kernels_1594751670175/work
sqlAlchemy @ file:///C:/ci/sqlalchemy_1593445271541/work
statsmodels==0.11.1
sympy @ file:///C:/ci/sympy_1594234545115/work
tables==3.6.1
tblib==1.6.0
tensorboard==2.4.0
tensorboard-plugin-wit==1.7.0
tensorflow==2.3.1
tensorflow-estimator==2.3.0
termcolor==1.1.0
terminado==0.8.3
testpath==0.4.4
threadpoolctl @ file:///tmp/tmp9twdgx9k/threadpoolctl-2.1.0-py3-none-any.whl
toml @ file:///tmp/build/80754af9/toml_1592853716807/work
toolz==0.10.0
tornado==6.0.4
tqdm @ file:///tmp/build/80754af9/tqdm_1593446365756/work
traitlets==4.3.3
typing-extensions @ file:///tmp/build/80754af9/typing_extensions_1592847887441/work
ujson==1.35
unicodecsv==0.14.1
urllib3==1.25.9
watchdog @ file:///C:/ci/watchdog_1593447437088/work
wcwidth @ file:///tmp/build/80754af9/wcwidth_1593447189090/work
webencodings==0.5.1
Werkzeug==1.0.1
wget==3.2
widgetsnbextension==3.5.1
win-inet-pton==1.1.0
win-unicode-console==0.5
wincertstore==0.2
wrapt==1.11.2
xlrd==1.2.0
XlsxWriter==1.2.9
xlwings==0.19.5
xlwt==1.3.0
xmltodict==0.12.0
yapf @ file:///tmp/build/80754af9/yapf_1593528177422/work
zict==2.0.0
zipp==3.1.0
zope.event==4.4
zope.interface==4.7.1

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

解决方法

尝试 pip list --format=freeze > requirements.txt 并重新运行。看起来这是由更改 pip freeze 的行为引起的。这是一些more information

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...