Repository: pandas-dev/pandas

Issue:
Error while installing dependencies
While running:
```
python3 -m venv pandas-venv
source pandas-venv/bin/activate
cd pandas-MyUserName
python -m pip install -r requirements-dev.txt
```

I get an error on line 20:
> ERROR: Could not find a version that satisfies the requirement dask-core (from -r requirements-dev.txt (line 20)) (from versions: none)
ERROR: No matching distribution found for dask-core (from -r requirements-dev.txt (line 20))

the output of ```uname -a``` is
> Linux null 5.3.1-arch1-1-ARCH #1 SMP PREEMPT Sat Sep 21 11:33:49 UTC 2019 x86_64 GNU/Linux

Error output:

![Error](https://user-images.githubusercontent.com/50263213/65962811-275f5d80-e462-11e9-8054-9b241e8811b6.png)


```
(pandas-venv) [bummy@null pandas-MomIsBestFriend]$ python -m pip install -r requirements-dev.txt 
Collecting numpy>=1.15 (from -r requirements-dev.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/ba/e0/46e2f0540370f2661b044647fa447fef2ecbcc8f7cdb4329ca2feb03fb23/numpy-1.17.2-cp37-cp37m-manylinux1_x86_64.whl (20.3MB)
     |████████████████████████████████| 20.3MB 4.1MB/s 
Collecting python-dateutil>=2.6.1 (from -r requirements-dev.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl (226kB)
     |████████████████████████████████| 235kB 3.9MB/s 
Collecting pytz (from -r requirements-dev.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/87/76/46d697698a143e05f77bec5a526bf4e56a0be61d63425b68f4ba553b51f2/pytz-2019.2-py2.py3-none-any.whl (508kB)
     |████████████████████████████████| 512kB 4.1MB/s 
Collecting asv (from -r requirements-dev.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/6e/94/4521cc0183a5656de9470452ddd2b6170a2d04ba9b18b84c597db09b8b0d/asv-0.4.1.tar.gz (470kB)
     |████████████████████████████████| 471kB 2.0MB/s 
Collecting cython>=0.29.13 (from -r requirements-dev.txt (line 5))
  Downloading https://files.pythonhosted.org/packages/f1/d3/03a01bcf424eb86d3e9d818e2082ced2d512001af89183fca6f550c32bc2/Cython-0.29.13-cp37-cp37m-manylinux1_x86_64.whl (2.1MB)
     |████████████████████████████████| 2.1MB 4.4MB/s 
Collecting black (from -r requirements-dev.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/30/62/cf549544a5fe990bbaeca21e9c419501b2de7a701ab0afb377bc81676600/black-19.3b0-py36-none-any.whl (89kB)
     |████████████████████████████████| 92kB 6.2MB/s 
Collecting cpplint (from -r requirements-dev.txt (line 7))
  Downloading https://files.pythonhosted.org/packages/30/9f/a44a503d457ebdb78298a1cb4dad99c1e506b901b300829fc28f3b3ddd6a/cpplint-1.4.4-py3-none-any.whl (73kB)
     |████████████████████████████████| 81kB 5.2MB/s 
Collecting flake8 (from -r requirements-dev.txt (line 8))
  Downloading https://files.pythonhosted.org/packages/26/de/3f815a99d86eb10464ea7bd6059c0172c7ca97d4bdcfca41051b388a653b/flake8-3.7.8-py2.py3-none-any.whl (70kB)
     |████████████████████████████████| 71kB 6.5MB/s 
Collecting flake8-comprehensions (from -r requirements-dev.txt (line 9))
  Downloading https://files.pythonhosted.org/packages/1e/5d/8e71c58199e70ee5e102212e4a6e8cd9ac6da004b03c1461c883cdbc3f83/flake8_comprehensions-2.2.0-py3-none-any.whl
Collecting flake8-rst<=0.7.0,>=0.6.0 (from -r requirements-dev.txt (line 10))
  Downloading https://files.pythonhosted.org/packages/81/50/96c9207354feae7ff27dcbd5e27585bac55a1a7b539f6b15e1fced1904a8/flake8_rst-0.7.0-py3-none-any.whl
Collecting isort (from -r requirements-dev.txt (line 11))
  Downloading https://files.pythonhosted.org/packages/e5/b0/c121fd1fa3419ea9bfd55c7f9c4fedfec5143208d8c7ad3ce3db6c623c21/isort-4.3.21-py2.py3-none-any.whl (42kB)
     |████████████████████████████████| 51kB 10.0MB/s 
Collecting mypy (from -r requirements-dev.txt (line 12))
  Downloading https://files.pythonhosted.org/packages/12/b0/b89484a61af650b731284aa20a3d0c268645ab28ffdeed41beab6a7ed640/mypy-0.730-cp37-cp37m-manylinux1_x86_64.whl (22.8MB)
     |████████████████████████████████| 22.8MB 2.1MB/s 
Collecting pycodestyle (from -r requirements-dev.txt (line 13))
  Downloading https://files.pythonhosted.org/packages/0e/0c/04a353e104d2f324f8ee5f4b32012618c1c86dd79e52a433b64fceed511b/pycodestyle-2.5.0-py2.py3-none-any.whl (51kB)
     |████████████████████████████████| 51kB 3.6MB/s 
Collecting gitpython (from -r requirements-dev.txt (line 14))
  Downloading https://files.pythonhosted.org/packages/8e/c7/70bd352e8a561a9b6d1cde9aa313b9d7c871b0c94c3821f44c01f3187e1d/GitPython-3.0.2-py3-none-any.whl (453kB)
     |████████████████████████████████| 460kB 5.3MB/s 
Collecting sphinx==1.8.5 (from -r requirements-dev.txt (line 15))
  Downloading https://files.pythonhosted.org/packages/7d/66/a4af242b4348b729b9d46ce5db23943ce9bca7da9bbe2ece60dc27f26420/Sphinx-1.8.5-py2.py3-none-any.whl (3.1MB)
     |████████████████████████████████| 3.1MB 2.7MB/s 
Collecting numpydoc>=0.9.0 (from -r requirements-dev.txt (line 16))
  Downloading https://files.pythonhosted.org/packages/6a/f3/7cfe4c616e4b9fe05540256cc9c6661c052c8a4cec2915732793b36e1843/numpydoc-0.9.1.tar.gz
Collecting nbconvert>=5.4.1 (from -r requirements-dev.txt (line 17))
  Downloading https://files.pythonhosted.org/packages/f9/df/4505c0a7fea624cac461d0f41051f33456ae656753f65cee8c2f43121cb2/nbconvert-5.6.0-py2.py3-none-any.whl (453kB)
     |████████████████████████████████| 460kB 5.5MB/s 
Collecting nbsphinx (from -r requirements-dev.txt (line 18))
  Downloading https://files.pythonhosted.org/packages/39/1f/c912f2f95d53d818dc76867f950883ae8a92849b7bef12a783106143cf08/nbsphinx-0.4.3-py2.py3-none-any.whl
Collecting pandoc (from -r requirements-dev.txt (line 19))
  Downloading https://files.pythonhosted.org/packages/49/b1/d2d4b30ee81ea5cb7aee5ba3591752a637fdc49d0a42fa9683874b60b9fb/pandoc-1.0.2.tar.gz (488kB)
     |████████████████████████████████| 491kB 4.4MB/s 
Collecting dask-core (from -r requirements-dev.txt (line 20))
  ERROR: Could not find a version that satisfies the requirement dask-core (from -r requirements-dev.txt (line 20)) (from versions: none)
ERROR: No matching distribution found for dask-core (from -r requirements-dev.txt (line 20))
(pandas-venv) [bummy@null pandas-MomIsBestFriend]$ 
```


Discussion:
I am looking into this. 
Thanks @anirudnits. You'll need to update `scripts/generate_pip_deps_from_conda_deps.py`. You'll want to rename `dask-core` to `dask`, then rerurn `scripts.generate_pip_deps_from_conda_deps.py` and hopefully things will work.
@MomIsBestFriend as a workaround, you can manually update `requirements-dev.txt` renaming dask-core to dask.
So, I believe here's the issue
dask-core is only included as a metapackage for conda-forge [https://github.com/conda-forge/staged-recipes/pull/3820](url)
but no such metapackage exists in PYPI and as such the error. This is also mentioned in: [https://github.com/dask/distributed/issues/962](url).
@TomAugspurger I went through `scripts/generate_pip_deps_from_conda_deps.py` and found out where the issue is. In line 48 only **pkg** is checked if it's there in dict **RENAME** and that only happens if there is a comparator (either of ==, <= or >=) in the package name. By adding an extra check
`if package in RENAME:`
 `       package = RENAME[package]`
at the end would solve the issue.
Ty:) @TomAugspurger
Yeah, I think renaming should be done regardless of the version
specification.

On Tue, Oct 1, 2019 at 12:02 PM Aniruddha Bhattacharjee <
notifications@github.com> wrote:

> @TomAugspurger <https://github.com/TomAugspurger> I went through
> scripts/generate_pip_deps_from_conda_deps.py and found out where the
> issue is. In line 48 only *pkg* is checked if it's there in dict *RENAME*
> and that only happens if there is a comparator (either of ==, <= or >=) in
> the package name. By adding an extra check
> if package in RENAME:
> package = RENAME[package]
> at the end would solve the issue.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/issues/28714?email_source=notifications&email_token=AAKAOIQSIQ75QHONTXQDX7LQMN7DBA5CNFSM4I4I64F2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAB7OFQ#issuecomment-537130774>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAKAOIQXTE5VBF5B3FM5EXTQMN7DBANCNFSM4I4I64FQ>
> .
>


Resolving patch:
diff --git a/scripts/generate_pip_deps_from_conda.py b/scripts/generate_pip_deps_from_conda.py
--- a/scripts/generate_pip_deps_from_conda.py
+++ b/scripts/generate_pip_deps_from_conda.py
@@ -48,6 +48,9 @@ def conda_package_to_pip(package):
 
         break
 
+    if package in RENAME:
+        return RENAME[package]
+
     return package
 
 


Test patch: