CI: Use conda-forge PyPy
State: closed

- [ ] closes #xxxx (Replace xxxx with the Github issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: CI
description: Continuous Integration

Comments:
i guess this needs a rebase?
@mattip It seems that the new PyPy release on conda-forge cannot find python packages installed from conda.
I've reproduced this locally by running,
```
conda env create --name pypy --file ci/deps/actions-pypy-38.yaml
```


<Details>

```

Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.11.0
  latest version: 4.12.0

Please update conda by running

    $ conda update -n base -c defaults conda


Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate pypy
#
# To deactivate an active environment, use
#
#     $ conda deactivate
```
</Details>


```conda activate pypy```

```conda list``` (packages are being installed)
<Details>

```

attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
blas                      2.113                  openblas    conda-forge
blas-devel                3.9.0           13_osx64_openblas    conda-forge
bzip2                     1.0.8                h0d85af4_4    conda-forge
ca-certificates           2021.10.8            h033912b_0    conda-forge
certifi                   2021.10.8        py38hecd8cb5_2  
click                     7.1.2              pyh9f0ad1d_0    conda-forge
coverage                  6.3.2            py38hca72f7f_0  
cython                    0.29.28          py38he9d5cce_0  
execnet                   1.9.0              pyhd8ed1ab_0    conda-forge
expat                     2.4.7                h96cf925_0    conda-forge
gdbm                      1.18                 h8a0c380_2    conda-forge
hypothesis                6.39.4             pyhd8ed1ab_0    conda-forge
importlib-metadata        3.3.0              pyhd8ed1ab_1    conda-forge
importlib_metadata        3.3.0                hd8ed1ab_3    conda-forge
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
libblas                   3.9.0           13_osx64_openblas    conda-forge
libcblas                  3.9.0           13_osx64_openblas    conda-forge
libcxx                    13.0.1               hc203e6f_0    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libgfortran               5.0.0           9_3_0_h6c81a4c_23    conda-forge
libgfortran5              9.3.0               h6c81a4c_23    conda-forge
liblapack                 3.9.0           13_osx64_openblas    conda-forge
liblapacke                3.9.0           13_osx64_openblas    conda-forge
libopenblas               0.3.18          openmp_h3351f45_0    conda-forge
libzlib                   1.2.11            h9173be1_1013    conda-forge
llvm-openmp               13.0.1               hcb1a161_1    conda-forge
ncurses                   6.3                  he49afe7_0    conda-forge
numpy                     1.21.2           py38h0fa1045_0  
numpy-base                1.21.2           py38hbbe2e76_0  
openblas                  0.3.18          openmp_h12da7db_0    conda-forge
openssl                   3.0.0                h0d85af4_2    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pip                       22.0.4             pyhd8ed1ab_0    conda-forge
pluggy                    0.12.0                     py_0    conda-forge
py                        1.11.0             pyh6c4a22f_0    conda-forge
pyparsing                 3.0.7              pyhd8ed1ab_0    conda-forge
pypy3.8                   7.3.8                hd7b965a_0    conda-forge
pytest                    6.2.5            py38hecd8cb5_2  
pytest-cov                3.0.0              pyhd8ed1ab_0    conda-forge
pytest-forked             1.4.0              pyhd8ed1ab_0    conda-forge
pytest-xdist              2.5.0              pyhd8ed1ab_0    conda-forge
python                    3.8.12                0_73_pypy    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.8               2_pypy38_pp73    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
readline                  8.1                  h05e3726_0    conda-forge
setuptools                58.0.4           py38hecd8cb5_0  
six                       1.16.0             pyh6c4a22f_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
sqlite                    3.37.1               hb516253_0    conda-forge
tk                        8.6.12               h5dbffcc_0    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
typing_extensions         4.1.1              pyha770c72_0    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
xz                        5.2.5                haf1e3a3_1    conda-forge
zipp                      3.7.0              pyhd8ed1ab_1    conda-forge
zlib                      1.2.11            h9173be1_1013    conda-forge
```
</Details>

but can't be imported
e.g.
```
(pypy) thomasli@Jufangs-MBP-2 pandas % python
Python 3.8.12 | packaged by conda-forge | (d00b0afd, Mar 10 2022, 01:05:31)
[PyPy 7.3.8 with GCC Clang 12.0.1] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'numpy'
```

I guess something is wrong with the Pythonpath on the conda pypy's. Interestingly enough, scripts that come with the packages can be found.
e.g.
if I run 
``
(pypy) thomasli@Jufangs-MBP-2 pandas % cython
Traceback (most recent call last):
  File "/Users/thomasli/opt/anaconda3/envs/pypy/bin/cython", line 7, in <module>
    from Cython.Compiler.Main import setuptools_main
ModuleNotFoundError: No module named 'Cython'
``
the command cython(and its script) is found. But the module the cython cannot be found.
The migration to start providing packages for pypy3.8 on conda-forge has not started yet.
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
There are 615 failed tests. We are allowing failures on this job? (and just checking that pandas builds?)
we don't have official support for pypy -

ideally we xfail the failing tests and actually make the build fail on failures 
> There are 615 failed tests. We are allowing failures on this job? (and just checking that pandas builds?)

For now, yes. This is probably helpful for conda-forge, as there is a PyPy build on there.

> we don't have official support for pypy -
> 
> ideally we xfail the failing tests and actually make the build fail on failures

Will do in a follow up (This may take a while, though. I am a bit busy now).

yep this all sounds great. @lithomas if you can make an issue (if we don't have alreadY).
> Will do in a follow up (This may take a while, though. I am a bit busy now).

Thanks @lithomas1. yep. not intended to block. just seeking clarification of purpose of ci job.

@meeseeksdev backport 1.4.x