title: pip freeze > requirements.txt followed by pip install -r requirements.txt gives ERROR conflicting dependencies
body: <p>I have two python environments on anaconda. Both are with python3.8.
  Env1 is where I did my work
  Env2 is a test environment to test if I can reproduce my work from scratch.</p>
  <p>Within Env1 I create a requirements.txt with:</p>
  <pre><code>!pip list --format=freeze &gt; requirements.txt
  </code></pre>
  <p>I did not use</p>
  <pre><code>pip freeze &gt; requirements.txt
  </code></pre>
  <p>Because it produces some direct file links after @ and the other environment can't resolve it and other machines would definitely be unable to resolve those links.</p>
  <p>Then I go to Env2 and I do:</p>
  <pre><code>pip install -r requirements.txt
  </code></pre>
  <p>This gives me the following error:</p>
  <pre><code>ERROR: Could not find a version that satisfies the requirement sip==4.19.13 (from versions: 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.2.0, 5.3.0, 5.4.0, 5.5.0, 6.0.0, 6.0.1, 6.0.2, 6.0.3, 6.1.0, 6.1.1, 6.2.0, 6.3.0, 6.3.1, 6.4.0, 6.5.0, 6.5.1, 6.6.0, 6.6.1)
  ERROR: No matching distribution found for sip==4.19.13
  </code></pre>
  <p>Then I change the sip==4.19.13 into sip&gt;=4.19.13 which resolves this error but gives an other one:</p>
  <pre><code>ERROR: Could not find a version that satisfies the requirement tensorboard-plugin-wit==1.6.0 (from versions: 1.6.0.post2, 1.6.0.post3, 1.7.0, 1.8.0, 1.8.1)
  ERROR: No matching distribution found for tensorboard-plugin-wit==1.6.0
  </code></pre>
  <p>Then I change the tensorboard-plugin-wit==1.6.0 into tensorboard-plugin-wit&gt;=1.6.0 which resolves this issue and gives another one.</p>
  <pre><code>ERROR: Cannot install -r requirements4.txt (line 17) and pycodestyle==2.7.0 because these package versions have conflicting dependencies.
  
  The conflict is caused by:
      The user requested pycodestyle==2.7.0
      autopep8 1.6.0 depends on pycodestyle&gt;=2.8.0
  
  To fix this you could try to:
  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict
  </code></pre>
  <p>And so on and so on.</p>
  <p>I don't understand what is happening, both environments are on the same machine, with the same version of python and the same version of pip:</p>
  <pre><code>(test) C:\Users\ypezeu\IA\Final_product2\src&gt;pip --version
  pip 21.2.2 from C:\Users\ypezeu\anaconda3\envs\test\lib\site-packages\pip (python 3.8)
  </code></pre>
  <p>Here is the requirements.txt file:</p>
  <pre><code>absl-py==0.15.0
  aiohttp==3.8.1
  aiosignal==1.2.0
  alabaster==0.7.12
  anyio==3.5.0
  appdirs==1.4.4
  argon2-cffi==21.3.0
  argon2-cffi-bindings==21.2.0
  arrow==0.13.1
  astor==0.8.1
  astroid==2.6.6
  asttokens==2.0.5
  astunparse==1.6.3
  async-timeout==4.0.1
  atomicwrites==1.4.0
  attrs==21.4.0
  autopep8==1.6.0
  Babel==2.9.1
  backcall==0.2.0
  bcrypt==3.2.0
  beautifulsoup4==4.11.1
  binaryornot==0.4.4
  black==19.10b0
  bleach==4.1.0
  blinker==1.4
  Bottleneck==1.3.2
  brotlipy==0.7.0
  cachetools==4.2.2
  certifi==2021.10.8
  cffi==1.15.0
  chardet==4.0.0
  charset-normalizer==2.0.4
  click==8.0.4
  cloudpickle==2.0.0
  colorama==0.4.4
  cookiecutter==1.7.2
  cryptography==3.4.8
  cycler==0.11.0
  debugpy==1.5.1
  decorator==5.1.1
  defusedxml==0.7.1
  diff-match-patch==20200713
  dm-tree==0.1.5
  docutils==0.17.1
  entrypoints==0.3
  executing==0.8.3
  fastjsonschema==2.15.3
  flake8==3.9.2
  flatbuffers==2.0
  fonttools==4.25.0
  frozenlist==1.2.0
  gast==0.3.3
  gitdb==4.0.9
  GitPython==3.1.27
  google-auth==2.6.0
  google-auth-oauthlib==0.4.4
  google-pasta==0.2.0
  grpcio==1.42.0
  h5py==2.10.0
  idna==3.3
  imagesize==1.3.0
  importlib-metadata==4.8.2
  inflection==0.5.1
  intervaltree==3.1.0
  ipykernel==6.9.1
  ipython==8.1.1
  ipython-genutils==0.2.0
  isort==5.9.3
  jedi==0.18.1
  Jinja2&lt;=3.1.2
  jinja2-time==0.2.0
  joblib==1.1.0
  jsonschema==3.2.0
  jupyter-client==6.1.12
  jupyter-contrib-core==0.3.3
  jupyter-contrib-nbextensions==0.5.1
  jupyter-core==4.9.2
  jupyter-highlight-selected-word==0.2.0
  jupyter-latex-envs==1.4.6
  jupyter-nbextensions-configurator==0.4.1
  jupyter-server==1.17.0
  jupyter-server-mathjax==0.2.5
  jupyterlab-pygments==0.1.2
  keras==2.8.0
  Keras-Applications==1.0.8
  Keras-Preprocessing==1.1.2
  keras-tcn==3.4.2
  keyring==23.4.0
  kiwisolver==1.3.2
  lazy-object-proxy==1.6.0
  libclang==13.0.0
  lightgbm==3.2.1
  lxml==4.8.0
  Markdown==3.3.4
  MarkupSafe==2.1.1
  matplotlib==3.5.1
  matplotlib-inline==0.1.2
  mccabe==0.6.1
  mistune==0.8.4
  mkl-fft==1.3.1
  mkl-random==1.2.2
  mkl-service==2.4.0
  multidict==5.1.0
  munkres==1.1.4
  mypy-extensions==0.4.3
  nbclient==0.5.11
  nbconvert==6.5.0
  nbdime==3.1.1
  nbformat==5.4.0
  nest-asyncio==1.5.1
  notebook==6.4.8
  numexpr==2.8.1
  numpy==1.22.3
  numpydoc==1.2
  oauthlib==3.2.0
  opt-einsum==3.3.0
  packaging==21.3
  pandas==1.4.1
  pandocfilters==1.5.0
  paramiko==2.8.1
  parso==0.8.3
  pathspec==0.7.0
  patsy==0.5.2
  pexpect==4.8.0
  pickleshare==0.7.5
  Pillow==9.0.1
  pip==21.2.2
  pluggy==1.0.0
  poyo==0.5.0
  prometheus-client==0.13.1
  prompt-toolkit==3.0.20
  protobuf==3.19.1
  psutil==5.8.0
  ptyprocess==0.7.0
  pure-eval==0.2.2
  pyasn1==0.4.8
  pyasn1-modules==0.2.8
  pycodestyle&gt;=2.7.0
  pycparser==2.21
  pydocstyle==6.1.1
  pyflakes==2.3.1
  Pygments==2.11.2
  PyJWT==2.1.0
  pylint==2.9.6
  pyls-spyder==0.4.0
  PyNaCl==1.4.0
  pyOpenSSL==21.0.0
  pyparsing==3.0.4
  pyreadline==2.1
  pyrsistent==0.18.0
  PySocks==1.7.1
  python-dateutil==2.8.2
  python-lsp-black==1.0.0
  python-lsp-jsonrpc==1.0.0
  python-lsp-server==1.2.4
  python-slugify==5.0.2
  pytz==2021.3
  pywin32==302
  pywin32-ctypes==0.2.0
  pywinpty==2.0.2
  PyYAML==6.0
  pyzmq==22.3.0
  QDarkStyle==3.0.2
  qstylizer==0.1.10
  QtAwesome==1.0.3
  qtconsole==5.2.2
  QtPy==1.11.2
  recordtype==1.3
  regex==2021.8.3
  requests==2.27.1
  requests-oauthlib==1.3.0
  rope==0.22.0
  rsa==4.7.2
  Rtree==0.9.7
  scikit-learn==1.0.2
  scipy==1.4.1
  seaborn==0.11.2
  Send2Trash==1.8.0
  setuptools==58.0.4
  six==1.16.0
  smmap==5.0.0
  sniffio==1.2.0
  snowballstemmer==2.2.0
  sortedcontainers==2.4.0
  soupsieve==2.3.2.post1
  Sphinx==4.4.0
  sphinxcontrib-applehelp==1.0.2
  sphinxcontrib-devhelp==1.0.2
  sphinxcontrib-htmlhelp==2.0.0
  sphinxcontrib-jsmath==1.0.1
  sphinxcontrib-qthelp==1.0.3
  sphinxcontrib-serializinghtml==1.1.5
  spyder==5.1.5
  spyder-kernels==2.1.3
  stack-data==0.2.0
  statsmodels==0.13.0
  tensorboard==2.8.0
  tensorboard-data-server==0.6.1
  tensorboard-plugin-wit&gt;=1.6.0
  tensorflow==2.8.0
  tensorflow-addons==0.16.1
  tensorflow-estimator==2.3.0
  tensorflow-hub==0.8.0
  tensorflow-io-gcs-filesystem==0.24.0
  tensorflow-probability==0.14.0
  termcolor==1.1.0
  terminado==0.13.1
  testpath==0.5.0
  text-unidecode==1.3
  textdistance==4.2.1
  tf-estimator-nightly==2.8.0.dev2021122109
  threadpoolctl==2.2.0
  three-merge==0.1.1
  tinycss==0.4
  tinycss2==1.1.1
  toml==0.10.2
  tornado==6.1
  tqdm==4.63.0
  traitlets==5.1.1
  typed-ast==1.4.3
  typeguard==2.13.3
  typing-extensions==3.10.0.2
  ujson==4.0.2
  Unidecode==1.2.0
  urllib3==1.26.8
  watchdog==2.1.6
  wcwidth==0.2.5
  webencodings==0.5.1
  websocket-client==1.3.2
  Werkzeug==2.0.3
  wheel==0.37.1
  whichcraft==0.6.1
  win-inet-pton==1.1.0
  wincertstore==0.2
  wrapt==1.12.1
  yapf==0.31.0
  yarl==1.6.3
  zipp==3.7.0
  </code></pre>
  <p>Could you please explain to me how to produce a requirements.txt that is working ? And why do I have this error please ?</p>