pytest-xdist not found by conda

65 views
Skip to first unread message

Line Bie Pedersen

unread,
Mar 2, 2017, 7:12:24 AM3/2/17
to PyData
Hey

I was trying the follow this guide on how to contribute to the code. Things were progressing without much trouble until the section on creating a development environment. It kept saying: 
$ conda create -n pandas_dev python=3 --file ci/requirements_dev.txt
Fetching package metadata .........




PackageNotFoundError: Package not found: '' Package missing in current linux-64 channels:
 
- pytest-xdist


You can search for packages on anaconda.org with


    anaconda search
-t conda pytest-xdist

I have no experience with anaconda, so I have no idea what this means and googling did not really lead to easy answers.

So I started guessing! I tried the suggested search, which gave me this:
$ anaconda search -t conda pytest-xdist
Using Anaconda API: https://api.anaconda.org
Run 'anaconda show <USER/PACKAGE>' to get more details:
Packages:
     
Name                      |  Version | Package Types   | Platforms      
     
------------------------- |   ------ | --------------- | ---------------
     
Trentonoliphant/pytest-xdist |     1.10 | conda           | win-32, win-64
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     asmeurer
/pytest-xdist     |     1.10 | conda           | osx-64        
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     astropy
-ci-extras/pytest-xdist |     1.10 | conda           | linux-64      
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     berend
/pytest-xdist       |   1.15.0 | conda           | osx-64        
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     bioconda
/pytest-xdist     |     1.14 | conda           | linux-64, osx-64
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     birdsarah
/pytest-xdist    |     1.14 | conda           | linux-64, win-32, win-64, linux-32, osx-64
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     bokeh
/pytest-xdist        |   1.15.0 | conda           | linux-64, win-32, win-64, linux-32, osx-64
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     clinicalgraphics
/pytest-xdist |   1.15.0 | conda           | linux-64, win-32, noarch, osx-64, linux-32, win-64
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     conda
-forge/pytest-xdist  |   1.15.0 | conda           | linux-64, win-32, win-64, osx-64
     dhirschfeld
/pytest-xdist  |     1.14 | conda           | win-64        
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     ericdill
/pytest-xdist     |     1.10 | conda           | linux-64      
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     hargup
/pytest-xdist       |          | conda           | linux-64, noarch
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     jesserobertson
/pytest-xdist |     1.10 | conda           | linux-64, win-64, linux-32, osx-64
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     jjbmatthews
/pytest-xdist  |     1.12 | conda           | linux-64, osx-64
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     mlgill
/pytest-xdist       |   1.13.1 | conda           | linux-64, osx-64
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     pbrod
/pytest-xdist        |   1.13.1 | conda           | win-32, win-64
                                         
: py.test xdist plugin for distributed testing and loop-on-failing modes
     spyder
-ide/pytest-xdist   |   1.15.0 | conda           | linux-64, win-32, win-64, osx-64
Found 17 packages

Which was not really helpful, as there seemed to be all these packages that looked right to me. Especially the 
conda-forge/pytest-xdist
package looked promising. Why was this not the chosen one?!

Next move was trying the suggested show command on the promising package:
$ anaconda show conda-forge/pytest-xdist                            
Using Anaconda API: https://api.anaconda.org
Name:    pytest-xdist
Summary:
Access:  public
Package Types:  conda
Versions:
   
+ 1.14
   
+ 1.15.0


To install this package with conda run:
     conda install
--channel https://conda.anaconda.org/conda-forge pytest-xdist


This gave me the clue to what may have solved the problem: Adding the channel as suggested by conda
$ conda create -n pandas_dev python=3 --file ci/requirements_dev.txt --channel https://conda.anaconda.org/conda-forge
Fetching package metadata ...........
Solving package specifications: .

Package plan for installation in environment xxx

The following NEW packages will be INSTALLED:

    blas:            1.1-openblas                  conda-forge
    ca-certificates: 2017.1.23-0                   conda-forge
    certifi:         2017.1.23-py36_0              conda-forge
    coverage:        4.3.4-py36_0                  conda-forge
    cython:          0.25.2-py36_0                 conda-forge
    execnet:         1.3.0-py36_1                             
    flake8:          3.3.0-py36_0                  conda-forge
    libgfortran:     3.0.0-1                                  
    mccabe:          0.6.1-py36_0                  conda-forge
    ncurses:         5.9-10                        conda-forge
    numpy:           1.12.0-py36_blas_openblas_200 conda-forge [blas_openblas]
    openblas:        0.2.19-1                      conda-forge
    openssl:         1.0.2h-3                      conda-forge
    pip:             9.0.1-py36_0                  conda-forge
    py:              1.4.31-py36_0                 conda-forge
    pycodestyle:     2.3.1-py36_0                  conda-forge
    pyflakes:        1.5.0-py36_0                  conda-forge
    pytest:          3.0.6-py36_0                  conda-forge
    pytest-cov:      2.4.0-py36_0                  conda-forge
    pytest-xdist:    1.15.0-py36_0                 conda-forge
    python:          3.6.0-2                       conda-forge
    python-dateutil: 2.6.0-py36_0                  conda-forge
    pytz:            2016.10-py36_0                conda-forge
    readline:        6.2-0                         conda-forge
    setuptools:      33.1.0-py36_0                 conda-forge
    six:             1.10.0-py36_1                 conda-forge
    sqlite:          3.13.0-1                      conda-forge
    tk:              8.5.19-1                      conda-forge
    wheel:           0.29.0-py36_0                 conda-forge
    xz:              5.2.2-0                       conda-forge
    zlib:            1.2.11-0                      conda-forge

Proceed ([y]/n)? y

This resulted in conda creating my new environment without further error messages. My problem is now that I do not know enough about python, pandas and anaconda to tell if it actually is a valid solution. I can't even tell if its conda or pandas developers I should be reporting this to ... Help?

Joris Van den Bossche

unread,
Mar 2, 2017, 6:25:19 PM3/2/17
to PyData
Hi Line,


> My problem is now that I do not know enough about python, pandas and anaconda to tell if it actually is a valid solution.

This is certainly a valid solution! And actually also the one I would recommend.

conda-forge is the community-managed repository fo the conda package manager (https://conda-forge.github.io/), so if you want to install a package not available in the default channel, I would always first try conda-forge (by using -c conda-forge).
It is actually the case that some of us have the channel activated by default, and probably for that reason did not encounter the error you had.

So it is actually our contributing docs that are not correct. If you want, and that would be a perfect first contribution, you can make a PR to update the contributing docs with adding a comment about the need to use the conda-forge channel.

That said, it is also not necessary to have pytest-xdist installed to have a development environment, it is only optional (to run tests in parallel).

Regards,
Joris

--
You received this message because you are subscribed to the Google Groups "PyData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydata+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeff Reback

unread,
Mar 2, 2017, 6:45:28 PM3/2/17
to pyd...@googlegroups.com
fyi we just added to our contributing docs that you can simply

pip install pytest-xdist 




I can be reached on my cell 917-971-6387
To unsubscribe from this group and stop receiving emails from it, send an email to pydata+un...@googlegroups.com.

Joris Van den Bossche

unread,
Mar 3, 2017, 6:28:25 AM3/3/17
to PyData
Yes, but still the guideline to set up a development environment will error if you do not have conda-forge added as a channel. So that should be corrected in the docs (or pytest-xdist removed from the requirements file).

Joris

Line Bie Pedersen

unread,
Mar 7, 2017, 2:13:53 AM3/7/17
to PyData
I would say remove the pytest-xdist from the requirements file if it is not actually a requirement. This will only postpone the package-not-found problem; I assume that the package will be needed at some point, so maybe a note on setting up conda with the necessary channels is still needed somewhere? I notice that you use pip to install and not conda to install pytest-xdist, is there any reason for that? Is pytest-xdist the only package needed from the conda-forge channel? Should I actually be making this an issue on git-hub and have the discussion there?
To unsubscribe from this group and stop receiving emails from it, send an email to pydata+un...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "PyData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydata+un...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "PyData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydata+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages