DOC: remove the force uninstall from contributing guide
State: closed

Closes https://github.com/pandas-dev/pandas/issues/25487

Labels:
name: Docs

Comments:
@jorisvandenbossche after doing a `conda env update`,  I found that `conda remove --force pandas` was still required.

and we are still using it in `ci/setup_env.sh`

https://github.com/pandas-dev/pandas/blob/93a67dbbb6f8adad0061eaa21a046ba44e297957/ci/setup_env.sh#L103

should this have been removed from the contributing guide?
@simonjayhawkins did you see the discussion in https://github.com/pandas-dev/pandas/issues/25487#issuecomment-469260527?

> after doing a conda env update, I found that conda remove --force pandas was still required.

What do you mean exactly with this? What went wrong if you did not do this?

> and we are still using it in ci/setup_env.sh

There is not much of a problem, as we are not installing anything else further in that env, I think
> @simonjayhawkins did you see the discussion in [#25487 (comment)](https://github.com/pandas-dev/pandas/issues/25487#issuecomment-469260527)?

yes. every time I do an `conda env update` and alot of times that I do a `conda install <something>`, then i need to rerun `conda remove --force pandas` and it does not overwrite the `python -m pip install -e .`. i.e. I do not need to rerun that command to access the dev version. 


> > after doing a conda env update, I found that conda remove --force pandas was still required.
> 
> What do you mean exactly with this? What went wrong if you did not do this?

the dev version is not imported (0.24.2 is imported instead) if I am not in the dev directory (i.e working with other code that imports pandas that I want to test with master) or if a select the pandas-dev env from Jupyter notebooks with multiple environment support.


> > and we are still using it in ci/setup_env.sh
> 
> There is not much of a problem, as we are not installing anything else further in that env, I think

so we could remove this then for consistency?





> alot of times that I do a conda install <something>, then i need to rerun conda remove --force pandas and it does not overwrite the python -m pip install -e ..

So you are saying that a `conda install <something>` where the something relies on pandas, does not install pandas again if you removed pandas from conda? I have the exact opposite experience .. (as I explained in the issue: installing something that relies on pandas overwrites the `pip install -e .`, which I would need to run again each time I do a `conda install something`). 
Do you have optional pip integration enabled for conda?
below is output for a `conda env create -f environment.yml` after deleting the enviroment. so similar to the contributing docs without the build step.

```
$ conda env list
# conda environments:
#
base                  *  C:\Users\simon\Anaconda3
pandas-azure-windows-27     C:\Users\simon\Anaconda3\envs\pandas-azure-windows-27
pandas-dev2              C:\Users\simon\Anaconda3\envs\pandas-dev2

(base)
simon@DESKTOP-4UB01H7 MINGW64 ~/OneDrive/code/pandas-simonjayhawkins (master)
$ conda env create -f environment.yml
Collecting package metadata (repodata.json): ...working... WARNING conda.base.context:use_only_tar_bz2(632): Conda is constrained to only using the old .tar.bz2 file format because you have conda-build installed, and it is <3.18.3.  Update or remove conda-build to get smaller downloads and faster extractions.
done
Solving environment: ...working... done

Downloading and Extracting Packages
vs2015_runtime-14.15 | 2.4 MB    | ########## | 100%
execnet-1.6.0        | 33 KB     | ########## | 100%
flask-1.0.3          | 141 KB    | ########## | 100%
mock-3.0.5           | 47 KB     | ########## | 100%
snowballstemmer-1.9. | 53 KB     | ########## | 100%
tornado-6.0.3        | 647 KB    | ########## | 100%
pyrsistent-0.14.11   | 92 KB     | ########## | 100%
coverage-4.5.3       | 236 KB    | ########## | 100%
prometheus_client-0. | 42 KB     | ########## | 100%
pyzmq-18.0.0         | 466 KB    | ########## | 100%
numba-0.44.1         | 2.8 MB    | ########## | 100%
wrapt-1.11.2         | 48 KB     | ########## | 100%
urllib3-1.24.2       | 153 KB    | ########## | 100%
setuptools-41.0.1    | 680 KB    | ########## | 100%
pyyaml-5.1.1         | 163 KB    | ########## | 100%
intel-openmp-2019.4  | 1.7 MB    | ########## | 100%
more-itertools-7.0.0 | 93 KB     | ########## | 100%
soupsieve-1.8        | 105 KB    | ########## | 100%
aws-xray-sdk-2.4.2   | 104 KB    | ########## | 100%
backports-1.0        | 139 KB    | ########## | 100%
py-1.8.0             | 141 KB    | ########## | 100%
docker-pycreds-0.4.0 | 14 KB     | ########## | 100%
attrs-19.1.0         | 57 KB     | ########## | 100%
mkl_fft-1.0.12       | 136 KB    | ########## | 100%
atomicwrites-1.3.0   | 13 KB     | ########## | 100%
jdcal-1.4.1          | 11 KB     | ########## | 100%
backports.weakref-1. | 7 KB      | ########## | 100%
jsonpickle-1.1       | 28 KB     | ########## | 100%
llvmlite-0.29.0      | 12.3 MB   | ########## | 100%
pycryptodome-3.7.3   | 5.9 MB    | ########## | 100%
babel-2.7.0          | 5.8 MB    | ########## | 100%
jmespath-0.9.4       | 22 KB     | ########## | 100%
sphinxcontrib-websup | 35 KB     | ########## | 100%
pyparsing-2.4.0      | 58 KB     | ########## | 100%
websocket-client-0.5 | 64 KB     | ########## | 100%
docker-py-4.0.1      | 171 KB    | ########## | 100%
jedi-0.13.3          | 234 KB    | ########## | 100%
markupsafe-1.1.1     | 32 KB     | ########## | 100%
kiwisolver-1.1.0     | 59 KB     | ########## | 100%
xmltodict-0.12.0     | 14 KB     | ########## | 100%
pysocks-1.7.0        | 30 KB     | ########## | 100%
prompt_toolkit-2.0.9 | 487 KB    | ########## | 100%
werkzeug-0.15.4      | 262 KB    | ########## | 100%
jupyter_core-4.5.0   | 48 KB     | ########## | 100%
parso-0.5.0          | 67 KB     | ########## | 100%
wheel-0.33.4         | 57 KB     | ########## | 100%
requests-2.22.0      | 90 KB     | ########## | 100%
jsonschema-3.0.1     | 107 KB    | ########## | 100%
win_inet_pton-1.1.0  | 9 KB      | ########## | 100%
pygments-2.4.2       | 664 KB    | ########## | 100%
backports.tempfile-1 | 12 KB     | ########## | 100%
decorator-4.4.0      | 19 KB     | ########## | 100%
pyaml-19.4.1         | 21 KB     | ########## | 100%
cffi-1.12.3          | 225 KB    | ########## | 100%
bzip2-1.0.7          | 158 KB    | ########## | 100%
cryptography-2.7     | 564 KB    | ########## | 100%
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... DEBUG menuinst_win32:__init__(196): Menu: name: 'Anaconda${PY_VER} ${PLATFORM}', prefix: 'C:\Users\simon\Anaconda3\envs\pandas-dev', env_name: 'pandas-dev', mode: 'user', used_mode: 'user'
DEBUG menuinst_win32:create(320): Shortcut cmd is C:\Users\simon\Anaconda3\python.exe, args are ['C:\\Users\\simon\\Anaconda3\\cwp.py', 'C:\\Users\\simon\\Anaconda3\\envs\\pandas-dev', 'C:\\Users\\simon\\Anaconda3\\envs\\pandas-dev\\python.exe', 'C:\\Users\\simon\\Anaconda3\\envs\\pandas-dev\\Scripts\\jupyter-notebook-script.py', '"%USERPROFILE%/"']
done
#
# To activate this environment, use
#
#     $ conda activate pandas-dev
#
# To deactivate an active environment, use
#
#     $ conda deactivate

(base)
simon@DESKTOP-4UB01H7 MINGW64 ~/OneDrive/code/pandas-simonjayhawkins (master)
$ conda activate pandas-dev
(pandas-dev)
simon@DESKTOP-4UB01H7 MINGW64 ~/OneDrive/code/pandas-simonjayhawkins (master)
$ conda list pandas
# packages in environment at C:\Users\simon\Anaconda3\envs\pandas-dev:
#
# Name                    Version                   Build  Channel
pandas                    0.24.2           py37ha925a31_0
(pandas-dev)
simon@DESKTOP-4UB01H7 MINGW64 ~/OneDrive/code/pandas-simonjayhawkins (master)
$ python -m pip install -e .
Obtaining file:///C:/Users/simon/OneDrive/code/pandas-simonjayhawkins
Requirement already satisfied: python-dateutil>=2.6.1 in c:\users\simon\anaconda3\envs\pandas-dev\lib\site-packages (from pandas==0.25.0rc0+19.g65e123c3c) (2.8.0)
Requirement already satisfied: pytz>=2017.2 in c:\users\simon\anaconda3\envs\pandas-dev\lib\site-packages (from pandas==0.25.0rc0+19.g65e123c3c) (2019.1)
Requirement already satisfied: numpy>=1.13.3 in c:\users\simon\anaconda3\envs\pandas-dev\lib\site-packages (from pandas==0.25.0rc0+19.g65e123c3c) (1.16.4)
Requirement already satisfied: six>=1.5 in c:\users\simon\anaconda3\envs\pandas-dev\lib\site-packages (from python-dateutil>=2.6.1->pandas==0.25.0rc0+19.g65e123c3c) (1.12.0)
Installing collected packages: pandas
  Found existing installation: pandas 0.25.0.dev0+786.gcf74b0272.dirty
    Can't uninstall 'pandas'. No files were found to uninstall.
  Running setup.py develop for pandas
Successfully installed pandas-0.24.2
(pandas-dev)
simon@DESKTOP-4UB01H7 MINGW64 ~/OneDrive/code/pandas-simonjayhawkins (master)
$ conda list pandas
# packages in environment at C:\Users\simon\Anaconda3\envs\pandas-dev:
#
# Name                    Version                   Build  Channel
pandas                    0.25.0rc0+19.g65e123c3c           dev_0    <develop>
(pandas-dev)
simon@DESKTOP-4UB01H7 MINGW64 ~/OneDrive/code/pandas-simonjayhawkins (master)
$ cd
(pandas-dev)
simon@DESKTOP-4UB01H7 MINGW64 ~
$ python
Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
>>> pd.__version__
'0.24.2'
>>> ^Z

(pandas-dev)
simon@DESKTOP-4UB01H7 MINGW64 ~
$ conda remove --force pandas

## Package Plan ##

  environment location: C:\Users\simon\Anaconda3\envs\pandas-dev

  removed specs:
    - pandas


The following packages will be REMOVED:

  pandas-0.24.2-py37ha925a31_0


Proceed ([y]/n)? y

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
(pandas-dev)
simon@DESKTOP-4UB01H7 MINGW64 ~
$ python
Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
>>> pd.__version__
'0.25.0rc0+19.g65e123c3c'
>>>

```
Hmm, I am quite sure that last time I tested it (when I commented https://github.com/pandas-dev/pandas/issues/25487#issuecomment-469283114, and also when I set up my current dev env on my laptop early June), this was working fine. 
But I can confirm that doing the same as you do above does not properly set up an editable install of pandas. So I am wondering if something in pandas, or conda, or pip, could have changed that influences this.


I tested with scikit-learn, and wanted to say that it is working as expected for them, so it might be something i pandas. But then I noticed I used `pip install -e .` instead of `python -m pip install -e .`, so tried the other as well. And indeed, that's the difference. I always did `pip install -e .` in the past, and that is working correctly to override the pip installed version with the development version.

I can't directly explain why this difference is there, though (I am certainly the python and pip commands both point to the correct env)