Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any plan of supporting conda for the non-scientific community? #7671

Closed
1 of 2 tasks
collinsethans opened this issue Aug 19, 2018 · 20 comments
Closed
1 of 2 tasks

Any plan of supporting conda for the non-scientific community? #7671

collinsethans opened this issue Aug 19, 2018 · 20 comments
Labels
locked [bot] locked due to inactivity source::community catch-all for issues filed by community members stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::support neither a bug nor feature, is really just a user having questions or difficulty somewhere

Comments

@collinsethans
Copy link

collinsethans commented Aug 19, 2018

We came across Anaconda yesterday, while trying to migratate our production s/w from py2 to py3. We like the ease of using it.

#1 We installed miniconda3 and find that there are many packages installed that we don't want. For eg: ipython, ipykernel, jupyter, matplotlib, etc. We actually don't use these and would like to have an installation where these packages are not installed by default, more of a bare and clean environment to start with. Is that possible?

#2 We find that tornado=5.1 is installed. For our production version, we use an older one, tornado=3.1. We installed it, however, there seems to be some path issues, and tornado 5.1 gets imported.

import tornado
tornado.version
'5.1'

How to install and use an older version of an already installed package?

Will be really glad if you can help us with these info. If things go smooth, we would be inclined to use it on our production server.

Best.

I'm submitting a...

  • bug report
  • feature request

Current Behavior

Steps to Reproduce


Expected Behavior

Environment Information

`conda info`


`conda config --show-sources`


`conda list --show-channel-urls`


@mingwandroid
Copy link
Contributor

We installed miniconda3 and find that there are many packages installed that we don't want. For eg: ipython, ipykernel, jupyter, matplotlib

This is not the case. I think you must've either installed miniconda over the top of anaconda or just installed anaconda.

@kalefranz kalefranz added type::support neither a bug nor feature, is really just a user having questions or difficulty somewhere source::community catch-all for issues filed by community members labels Aug 20, 2018
@kalefranz
Copy link
Contributor

You've definitely gotten the Anaconda installer somehow (maybe from https://www.anaconda.com/download ?) rather than the Miniconda installer. The Miniconda installers are located at https://conda.io/miniconda.html. Miniconda is the way to bootstrap just conda and its dependencies, which happens to include a python interpreter at the moment (which is why there's a Miniconda2 and Miniconda3), but might not always.

@kalefranz
Copy link
Contributor

Conda is heavily used in many enterprise production systems. https://www.paypal-engineering.com/2016/09/07/python-packaging-at-paypal/ is a good example.

@collinsethans
Copy link
Author

collinsethans commented Aug 20, 2018

@kalefranz Hi, your answer is very encouraging for us, more so as we were thinking that Conda is heavily biased towards scientific community. But first, let me clarify what we did, there may be a problem with the miniconda release.

  • We installed miniconda for Python 3.6, from https://conda.io/miniconda.html. We had downloaded the file: Miniconda3-latest-Linux-x86_64.sh. Just now computed the md5: a946ea1d0c4a642ddf0c3a26a18bb16d.

  • Install command: bash ~/Downloads/Miniconda3-latest-Linux-x86_64.sh -u

  • We thought the installation was fine, as the initial size reported by 'du -sh /opt/miniconda3' was 283M (conda.io documentation for System Requirements mentioned of 400M for miniconda).

  • Our first env logs:

conda create -n mc2714 python=2.7.14 --no-default-packages
conda list
# packages in environment at /opt/miniconda3/envs/mc2714:
#
# Name Version Build Channel
ca-certificates 2018.03.07 0
certifi 2018.8.13 py27_0
libedit 3.1.20170329 h6b74fdf_2
libffi 3.2.1 hd88cf55_4
libgcc-ng 8.2.0 hdf63c60_1
libstdcxx-ng 8.2.0 hdf63c60_1
ncurses 6.1 hf484d3e_0
openssl 1.0.2p h14c3975_0
pip 10.0.1 py27_0
python 2.7.14 h1571d57_31
readline 7.0 ha6073c6_4
setuptools 40.0.0 py27_0
sqlite 3.24.0 h84994c4_0
tk 8.6.7 hc745277_3
wheel 0.31.1 py27_0
zlib 1.2.11 ha838bed_2

pip freeze
backports-abc==0.5
backports.functools-lru-cache==1.5
backports.shutil-get-terminal-size==1.0.0
bleach==2.1.3
certifi==2018.8.13
configparser==3.5.0
cycler==0.10.0
decorator==4.3.0
entrypoints==0.2.3
functools32==3.2.3.post2
futures==3.2.0
ipykernel==4.8.2
ipython==5.8.0
ipython-genutils==0.2.0
ipywidgets==7.4.0
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.3
jupyter-console==5.2.0
jupyter-core==4.4.0
kiwisolver==1.0.1
matplotlib==2.2.2
mistune==0.8.3
nbconvert==5.3.1
nbformat==4.4.0
notebook==5.6.0
pandocfilters==1.4.2
pathlib2==2.3.2
pickleshare==0.7.4
prometheus-client==0.3.1
prompt-toolkit==1.0.15
ptyprocess==0.6.0
pyparsing==2.2.0
python-dateutil==2.7.3
pytz==2018.5
pyzmq==17.1.0
qtconsole==4.3.1
scandir==1.8
Send2Trash==1.5.0
simplegeneric==0.8.1
singledispatch==3.4.0.3
subprocess32==3.5.2
terminado==0.8.1
testpath==0.3.1
tornado==5.1
traitlets==4.3.2
wcwidth==0.1.7
widgetsnbextension==3.4.0

Here, you will see the installation of ipython, matplotlib, tornado, etc, which I was mentioning as not needed for us. And as mentioned early on, I crosschecked that we installed miniconda py 3.6.

Do let us know if something is wrong.

@kalefranz
Copy link
Contributor

kalefranz commented Aug 20, 2018

Which pip are you using? (i.e. which -a pip) What's the output of

/opt/miniconda3/envs/mc2714/bin/pip freeze

?

@kalefranz
Copy link
Contributor

kalefranz commented Aug 20, 2018

Re-ran your workflow in a linux docker container, and I get expected results.

$ docker run --rm -it continuumio/miniconda3 /bin/bash
(base) root@e1b783b24b66:/# conda create -n mc2714 python=2.7.14 --no-default-packages
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.5.4
  latest version: 4.5.10

Please update conda by running

    $ conda update -n base conda



## Package Plan ##

  environment location: /opt/conda/envs/mc2714

  added / updated specs:
    - python=2.7.14


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    sqlite-3.24.0              |       h84994c4_0         1.8 MB
    setuptools-40.0.0          |           py27_0         583 KB
    openssl-1.0.2p             |       h14c3975_0         3.5 MB
    python-2.7.14              |      h1571d57_31        11.8 MB
    certifi-2018.8.13          |           py27_0         139 KB
    libstdcxx-ng-8.2.0         |       hdf63c60_1         2.9 MB
    libgcc-ng-8.2.0            |       hdf63c60_1         7.6 MB
    wheel-0.31.1               |           py27_0          62 KB
    pip-10.0.1                 |           py27_0         1.7 MB
    ------------------------------------------------------------
                                           Total:        30.0 MB

The following NEW packages will be INSTALLED:

    ca-certificates: 2018.03.07-0
    certifi:         2018.8.13-py27_0
    libedit:         3.1.20170329-h6b74fdf_2
    libffi:          3.2.1-hd88cf55_4
    libgcc-ng:       8.2.0-hdf63c60_1
    libstdcxx-ng:    8.2.0-hdf63c60_1
    ncurses:         6.1-hf484d3e_0
    openssl:         1.0.2p-h14c3975_0
    pip:             10.0.1-py27_0
    python:          2.7.14-h1571d57_31
    readline:        7.0-ha6073c6_4
    setuptools:      40.0.0-py27_0
    sqlite:          3.24.0-h84994c4_0
    tk:              8.6.7-hc745277_3
    wheel:           0.31.1-py27_0
    zlib:            1.2.11-ha838bed_2

Proceed ([y]/n)? y


Downloading and Extracting Packages
sqlite-3.24.0        |  1.8 MB | ##################################################################################################################################################################################################### | 100%
setuptools-40.0.0    |  583 KB | ##################################################################################################################################################################################################### | 100%
openssl-1.0.2p       |  3.5 MB | ##################################################################################################################################################################################################### | 100%
python-2.7.14        | 11.8 MB | ##################################################################################################################################################################################################### | 100%
certifi-2018.8.13    |  139 KB | ##################################################################################################################################################################################################### | 100%
libstdcxx-ng-8.2.0   |  2.9 MB | ##################################################################################################################################################################################################### | 100%
libgcc-ng-8.2.0      |  7.6 MB | ##################################################################################################################################################################################################### | 100%
wheel-0.31.1         |   62 KB | ##################################################################################################################################################################################################### | 100%
pip-10.0.1           |  1.7 MB | ##################################################################################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate mc2714
#
# To deactivate an active environment, use
#
#     $ conda deactivate

(base) root@e1b783b24b66:/# conda list -p /opt/conda/envs/mc2714
# packages in environment at /opt/conda/envs/mc2714:
#
# Name                    Version                   Build  Channel
ca-certificates           2018.03.07                    0
certifi                   2018.8.13                py27_0
libedit                   3.1.20170329         h6b74fdf_2
libffi                    3.2.1                hd88cf55_4
libgcc-ng                 8.2.0                hdf63c60_1
libstdcxx-ng              8.2.0                hdf63c60_1
ncurses                   6.1                  hf484d3e_0
openssl                   1.0.2p               h14c3975_0
pip                       10.0.1                   py27_0
python                    2.7.14              h1571d57_31
readline                  7.0                  ha6073c6_4
setuptools                40.0.0                   py27_0
sqlite                    3.24.0               h84994c4_0
tk                        8.6.7                hc745277_3
wheel                     0.31.1                   py27_0
zlib                      1.2.11               ha838bed_2
(base) root@e1b783b24b66:/# /opt/conda/envs/mc2714/bin/pip freeze
certifi==2018.8.13
(base) root@e1b783b24b66:/# conda activate /opt/conda/envs/mc2714
(mc2714) root@e1b783b24b66:/# pip freeze
certifi==2018.8.13

@collinsethans
Copy link
Author

I have createv 2 new envs and the output of 'pip freeze' is different for py 2.7 and py3.7. Attached below are the logs.

collinethan: ~$ conda create -n mc2714 python=2.7.14 --no-default-packages
Solving environment: done

## Package Plan ##

  environment location: /opt/miniconda3/envs/mc2714

  added / updated specs: 
    - python=2.7.14


The following NEW packages will be INSTALLED:

    ca-certificates: 2018.03.07-0           
    certifi:         2018.8.13-py27_0       
    libedit:         3.1.20170329-h6b74fdf_2
    libffi:          3.2.1-hd88cf55_4       
    libgcc-ng:       8.2.0-hdf63c60_1       
    libstdcxx-ng:    8.2.0-hdf63c60_1       
    ncurses:         6.1-hf484d3e_0         
    openssl:         1.0.2p-h14c3975_0      
    pip:             10.0.1-py27_0          
    python:          2.7.14-h1571d57_31     
    readline:        7.0-ha6073c6_4         
    setuptools:      40.0.0-py27_0          
    sqlite:          3.24.0-h84994c4_0      
    tk:              8.6.7-hc745277_3       
    wheel:           0.31.1-py27_0          
    zlib:            1.2.11-ha838bed_2      

Proceed ([y]/n)? 

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate mc2714
#
# To deactivate an active environment, use
#
#     $ conda deactivate

collinethan: ~$ conda activate mc2714

(mc2714) collinethan: ~$ conda list
# packages in environment at /opt/miniconda3/envs/mc2714:
#
# Name                    Version                   Build  Channel
ca-certificates           2018.03.07                    0  
certifi                   2018.8.13                py27_0  
libedit                   3.1.20170329         h6b74fdf_2  
libffi                    3.2.1                hd88cf55_4  
libgcc-ng                 8.2.0                hdf63c60_1  
libstdcxx-ng              8.2.0                hdf63c60_1  
ncurses                   6.1                  hf484d3e_0  
openssl                   1.0.2p               h14c3975_0  
pip                       10.0.1                   py27_0  
python                    2.7.14              h1571d57_31  
readline                  7.0                  ha6073c6_4  
setuptools                40.0.0                   py27_0  
sqlite                    3.24.0               h84994c4_0  
tk                        8.6.7                hc745277_3  
wheel                     0.31.1                   py27_0  
zlib                      1.2.11               ha838bed_2  

(mc2714) collinethan: ~$ which -a pip
/opt/miniconda3/envs/mc2714/bin/pip
/opt/miniconda3/bin/pip
/usr/local/bin/pip

(mc2714) collinethan: ~$ pip -V
pip 10.0.1 from /opt/miniconda3/envs/mc2714/lib/python2.7/site-packages/pip (python 2.7)

(mc2714) collinethan: ~$ /opt/miniconda3/envs/mc2714/bin/pip freeze
backports-abc==0.5
backports.functools-lru-cache==1.5
backports.shutil-get-terminal-size==1.0.0
bleach==2.1.3
certifi==2018.8.13
configparser==3.5.0
cycler==0.10.0
decorator==4.3.0
entrypoints==0.2.3
functools32==3.2.3.post2
futures==3.2.0
ipykernel==4.8.2
ipython==5.8.0
ipython-genutils==0.2.0
ipywidgets==7.4.0
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.3
jupyter-console==5.2.0
jupyter-core==4.4.0
kiwisolver==1.0.1
matplotlib==2.2.2
mistune==0.8.3
nbconvert==5.3.1
nbformat==4.4.0
notebook==5.6.0
pandocfilters==1.4.2
pathlib2==2.3.2
pickleshare==0.7.4
prometheus-client==0.3.1
prompt-toolkit==1.0.15
ptyprocess==0.6.0
pyparsing==2.2.0
python-dateutil==2.7.3
pytz==2018.5
pyzmq==17.1.0
qtconsole==4.3.1
scandir==1.8
Send2Trash==1.5.0
simplegeneric==0.8.1
singledispatch==3.4.0.3
subprocess32==3.5.2
terminado==0.8.1
testpath==0.3.1
tornado==5.1
traitlets==4.3.2
wcwidth==0.1.7
widgetsnbextension==3.4.0

(mc2714) collinethan: ~$ python
Python 2.7.14 |Anaconda, Inc.| (default, Mar 27 2018, 17:29:31) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tornado
>>> tornado.version
'5.1'

(mc2714) collinethan: ~$ conda info

     active environment : mc2714
    active env location : /opt/miniconda3/envs/mc2714
            shell level : 1
       user config file : /home/collinethan/.condarc
 populated config files : 
          conda version : 4.5.10
    conda-build version : not installed
         python version : 3.6.5.final.0
       base environment : /opt/miniconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/linux-64
                          https://repo.anaconda.com/pkgs/pro/noarch
          package cache : /opt/miniconda3/pkgs
                          /home/collinethan/.conda/pkgs
       envs directories : /opt/miniconda3/envs
                          /home/collinethan/.conda/envs
               platform : linux-64
             user-agent : conda/4.5.10 requests/2.18.4 CPython/3.6.5 Linux/3.16.0-4-amd64 debian/8 glibc/2.19
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

And below is with py3.7, where the output is similar as your's.

(mc37) collinethan: ~$ conda list
# packages in environment at /opt/miniconda3/envs/mc37:
#
# Name                    Version                   Build  Channel
ca-certificates           2018.03.07                    0  
certifi                   2018.8.13                py37_0  
libedit                   3.1.20170329         h6b74fdf_2  
libffi                    3.2.1                hd88cf55_4  
libgcc-ng                 8.2.0                hdf63c60_1  
libstdcxx-ng              8.2.0                hdf63c60_1  
ncurses                   6.1                  hf484d3e_0  
openssl                   1.0.2p               h14c3975_0  
pip                       10.0.1                   py37_0  
python                    3.7.0                hc3d631a_0  
readline                  7.0                  ha6073c6_4  
setuptools                40.0.0                   py37_0  
sqlite                    3.24.0               h84994c4_0  
tk                        8.6.7                hc745277_3  
wheel                     0.31.1                   py37_0  
xz                        5.2.4                h14c3975_4  
zlib                      1.2.11               ha838bed_2  
(mc37) collinethan: ~$ pip freeze
certifi==2018.8.13
(mc37) collinethan: ~$  

(mc37) collinethan: ~$ which -a pip
/opt/miniconda3/envs/mc37/bin/pip
/opt/miniconda3/bin/pip
/usr/local/bin/pip
(mc37) collinethan: ~$ pip -V
pip 10.0.1 from /opt/miniconda3/envs/mc37/lib/python3.7/site-packages/pip (python 3.7)

(mc37) collinethan: ~$ python
Python 3.7.0 (default, Jun 28 2018, 13:15:42) 
[GCC 7.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tornado
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tornado'
>>>

As you see above, the pip freeze o/p of both the envs are diff (with being a part of the respective env). I had also not installed tornado pkg in either of the envs, but it is importable in py2.7.

In your setup, did you install the miniconda3 from the release version available online? (I had used it the switch '-u', to install in precreated dir).

I can remove miniconda and install again, but I don't find how that will be different.

@collinsethans
Copy link
Author

Hi @kalefranz, can you keep this issue open?

@kalefranz
Copy link
Contributor

You're probably running into #7173. This is really a pip and python issue, not a conda issue. Check the contents of /home/collinethan/.local/lib/python2.7.

I'll re-open, but I really need you to demonstrate what conda is doing incorrectly in any of your workflows. Start with a standard docker container, using docker run --rm -it continuumio/miniconda3 /bin/bash, and then give reproducible steps that illustrate the issue you're running into. If you don't trust how that miniconda3 container is built (the Dockerfile is here), start with a container of your choice and show the whole workflow of downloading the miniconda installer and taking it from there.

@kalefranz kalefranz reopened this Aug 20, 2018
@collinsethans
Copy link
Author

@kalefranz I will look deeper into #7173.

I problem I have is installation of unwanted packages, like tornado=5.1, jupyter, ipython, etc, which we do not need on our dev/production platform. The other problem is not able to install a lower version of tornado=3.1.1 to importing it successfully -- it loads 5.1.

I will provide you reproduceable steps with docker. We haven't yet used docker and I need to understand and set it up, prior to creating it.

@collinsethans
Copy link
Author

Hi @kalefranz thanks for the lead to ~/.local/lib/python27.

I do find now that those extra pkgs (ipython, jupyter, tornado=5.1,send2trash etc) showing up on mc3 env were existing only in ~/.local/lib/python2.7, as you pointed out. I had those selected pkgs installed on my host's native python using pip with '--user' switch. I have now also tested that removing/installing back those pkgs on my native python using pip with '--user' control their availability in my mc3 py2714 env accordingly, as shown below:

# Below in minoconda3 console, using mc2714 env
(mc2714) collinethan: ~$ pip freeze | grep -i send2trash
39:Send2Trash==1.5.0


# Below in 2nd console
collinethan: ~$ pip uninstall Send2Trash
<snip>
  Successfully uninstalled Send2Trash-1.5.0
You are using pip version 8.1.2, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


# In minoconda3 console
(mc2714) collinethan: ~$ pip freeze | grep -i send2trash
(mc2714) collinethan: ~$ 


# In 2nd console
collinethan: ~$ pip install send2trash --user --cache-dir=/opt/.pythonbrew/pip-cache
Collecting send2trash
Installing collected packages: send2trash
Successfully installed send2trash-1.5.0
You are using pip version 8.1.2, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

# In minoconda3 console
(mc2714) collinethan: ~$ pip freeze | grep -i send2trash
39:Send2Trash==1.5.0

However, NOTE that this issue doesn't exist with our pythonbrew/pip/virtualenv environments, which we have been using for the last couple of years, in both dev and production. That is why those pkgs didn't show up on our work envs, but first when I tried mc3.

# In 3rd console:
collinethan: ~$ pip freeze | grep -i send2trash
You are using pip version 8.1.2, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
93:Send2Trash==1.5.0
collinethan: ~$ 
collinethan: ~$ pip uninstall Send2Trash
Uninstalling Send2Trash-1.5.0:
  /home/collinethan/.local/lib/python2.7/site-packages/Send2Trash-1.5.0.dist-info/DESCRIPTION.rst
  /home/collinethan/.local/lib/python2.7/site-packages/Send2Trash-1.5.0.dist-info/INSTALLER
  /home/collinethan/.local/lib/python2.7/site-packages/Send2Trash-1.5.0.dist-info/METADATA
  /home/collinethan/.local/lib/python2.7/site-packages/Send2Trash-1.5.0.dist-info/RECORD
  /home/collinethan/.local/lib/python2.7/site-packages/Send2Trash-1.5.0.dist-info/WHEEL
  /home/collinethan/.local/lib/python2.7/site-packages/Send2Trash-1.5.0.dist-info/metadata.json
  /home/collinethan/.local/lib/python2.7/site-packages/Send2Trash-1.5.0.dist-info/top_level.txt
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/__init__.py
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/__init__.pyc
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/compat.py
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/compat.pyc
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/exceptions.py
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/exceptions.pyc
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/plat_gio.py
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/plat_gio.pyc
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/plat_osx.py
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/plat_osx.pyc
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/plat_other.py
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/plat_other.pyc
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/plat_win.py
  /home/collinethan/.local/lib/python2.7/site-packages/send2trash/plat_win.pyc
Proceed (y/n)? y
  Successfully uninstalled Send2Trash-1.5.0
You are using pip version 8.1.2, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
collinethan: ~$ 
collinethan: ~$ pip freeze | grep -i send2trash
You are using pip version 8.1.2, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
collinethan: ~$ 
collinethan: ~$ pip install send2trash --user
Collecting send2trash
Installing collected packages: send2trash
Successfully installed send2trash-1.5.0
You are using pip version 8.1.2, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
collinethan: ~$ pip freeze | grep -i send2trash
You are using pip version 8.1.2, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
93:Send2Trash==1.5.0
collinethan: ~$ 
collinethan: ~$ we
Using `Python-2.7.14`
[we14]collinethan: ~$ alias we
alias we='source /opt/cag/workenv_2714.sh'
[we14]collinethan: ~$ cat /opt/cag/workenv_2714.sh
# we: Work Environment
#
# Pythons, using pythonbrew.
# Follow the ordering, important.
export PYTHONBREW_ROOT=/opt/.pythonbrew
[[ -s $PYTHONBREW_ROOT/etc/bashrc ]] && source $PYTHONBREW_ROOT/etc/bashrc

pythonbrew use 2.7.14

alias pipi='pip install --cache-dir='$PYTHONBREW_ROOT'/pip-cache'

export WORKON_HOME=/opt/.pb2714_virtualenvs
source $PYTHONBREW_ROOT/pythons/Python-2.7.14/bin/virtualenvwrapper.sh

export PS1="[we14]"$PS1
[we14]collinethan: ~$ 
[we14]collinethan: ~$ workon pst-16feb18
(pst-16feb18)[we14]collinethan: ~$ 
(pst-16feb18)[we14]collinethan: ~$ pip freeze | grep -i send2trash
You are using pip version 9.0.3, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(pst-16feb18)[we14]collinethan: ~$ 
(pst-16feb18)[we14]collinethan: ~$ which pip
/opt/.pb2714_virtualenvs/pst-16feb18/bin/pip

As shown above, the problem with pkgs existing in ~/.local/lib/python2.7 doesn't show up in our pythonbrew/virtualenv environment.

So, maybe conda can handle this issue as well?

@kalefranz
Copy link
Contributor

As you can see by #7173 and back to #448, this is a contentious, long-standing issue. There's no clear agreement on how to solve it. The issue is complicated by the fact that this really isn't a conda thing at all; it's all part of the python interpreter. Of course we can actively patch this behavior out of the python interpreter in the python that conda installs, but changing behavior like that to something we don't "own" is always incredibly controversial.

For your use case right now, I would recommend setting the PYTHONNOUSERSITE environment variable.

My thoughts on where we're headed in general on this topic... For activated non-base conda environments, conda activate will actually go ahead and set the PYTHONNOUSERSITE environment variable, I'm suggesting you do now yourself. By default it will not set it for the base environment, whether the base environment is properly activated or not. This behavior will all be configurable, and there appear to be three states to what we're proposing for python interpreter isolation from ~/.local: disabled, non-base, all. The default value for the configuration, as proposed, would be the non-base one.

@kalefranz
Copy link
Contributor

As an aside...

for the non-scientific community

which community/communities do you feel most associated with?

@collinsethans
Copy link
Author

We are an ecommerce startup, with the complete ecommerce stack developed from scratch. We therefore work mostly with the tornado/redis/mysql/.. communities, but most of the other components are developed in house.

Personally I am also in stock analysis, in my off times. That's where I had tried out the ipython/jupyter/matplotlib/.. packages.

We typically prefer minimal environments to work with. It's nice to have many packages, but as a list, where we can search and refer/use as and when needed. That way, it helps avoiding distractions. I think miniconda3 is mostly fitting there well.

@collinsethans
Copy link
Author

Hi @kalefranz For our use case (mentioned in last post), we find that 'conda-forge' is a better repo for us as it has many of the pkgs that we use (though not all) compared to the default pkgs/[main|free|r|pro]. But the latter has a few pkgs with newer versions, comparatively.

We were thinking of using both -- conda-forge and the default ones. However, we notice that pkgs from one of them do not cowork with those from the other. Aren't they supposed to?

collinethan: ~$ conda create -c conda-forge -n test2715 python=2.7.15
Solving environment: done

<snip for brevity>

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate test2715
#
# To deactivate an active environment, use
#
#     $ conda deactivate

collinethan: ~$ conda activate test2715

(test2715) collinethan: ~$ conda list
# packages in environment at /opt/miniconda3/envs/test2715:
#
# Name                    Version                   Build  Channel
bzip2                     1.0.6                h470a237_2    conda-forge
ca-certificates           2018.8.24            ha4d7672_0    conda-forge
certifi                   2018.8.24                py27_1    conda-forge
libgcc-ng                 7.2.0                hdf63c60_3    conda-forge
libstdcxx-ng              7.2.0                hdf63c60_3    conda-forge
ncurses                   6.1                  hfc679d8_1    conda-forge
openssl                   1.0.2o               h470a237_1    conda-forge
pip                       18.0                     py27_1    conda-forge
python                    2.7.15               h9fef7bc_0    conda-forge
readline                  7.0                  haf1bffa_1    conda-forge
setuptools                40.2.0                   py27_0    conda-forge
sqlite                    3.24.0               h2f33b56_0    conda-forge
tk                        8.6.8                         0    conda-forge
wheel                     0.31.1                   py27_1    conda-forge
zlib                      1.2.11               h470a237_3    conda-forge
(test2715) collinethan: ~$ conda info

     active environment : test2715
    active env location : /opt/miniconda3/envs/test2715
            shell level : 1
       user config file : /home/collinethan/.condarc
 populated config files : 
          conda version : 4.5.10
    conda-build version : not installed
         python version : 3.6.5.final.0
       base environment : /opt/miniconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/linux-64
                          https://repo.anaconda.com/pkgs/pro/noarch
          package cache : /opt/miniconda3/pkgs
                          /home/collinethan/.conda/pkgs
       envs directories : /opt/miniconda3/envs
                          /home/collinethan/.conda/envs
               platform : linux-64
             user-agent : conda/4.5.10 requests/2.18.4 CPython/3.6.5 Linux/3.16.0-4-amd64 debian/8 glibc/2.19
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False


(test2715) collinethan: ~$ conda update openssl
Solving environment: done

## Package Plan ##

  environment location: /opt/miniconda3/envs/test2715

  added / updated specs: 
    - openssl


The following packages will be UPDATED:

    openssl:         1.0.2o-h470a237_1    conda-forge --> 1.0.2p-h14c3975_0

The following packages will be DOWNGRADED:

    ca-certificates: 2018.8.24-ha4d7672_0 conda-forge --> 2018.03.07-0     
    certifi:         2018.8.24-py27_1     conda-forge --> 2018.8.13-py27_0 

Proceed ([y]/n)? n


CondaSystemExit: Exiting.
(mc2715) collinethan: ~$ conda search ca-certificates
Loading channels: done
# Name                  Version           Build  Channel             
ca-certificates      2017.08.26      h1d4fec5_0  pkgs/main           
ca-certificates      2018.03.07               0  pkgs/main   
(mc2715) collinethan: ~$ conda search certifi
Loading channels: done
# Name                  Version           Build  Channel             
<snip>
certifi               2018.8.13          py27_0  pkgs/main           
<snip>
collinethan: ~$ conda search openssl --info
Loading channels: done

<snip>

openssl 1.0.2p h14c3975_0
-------------------------
file name   : openssl-1.0.2p-h14c3975_0.tar.bz2
name        : openssl
version     : 1.0.2p
build string: h14c3975_0
build number: 0
size        : 3.5 MB
constrains  : ()
license     : OpenSSL
subdir      : linux-64
url         : https://repo.anaconda.com/pkgs/main/linux-64/openssl-1.0.2p-h14c3975_0.tar.bz2
md5         : a8c786dd6f250cea5c273afd78ac426a
dependencies: 
  - ca-certificates
  - libgcc-ng >=7.2.0

Here, I installed python-2.7.15 from conda-forge. Then wanted to update openssl pkg from defaults which has a newer version. But, it wants to downgrade the ca-certificates and certifi pkgs, as the default repos have lower version.

This looks quite strange. Are we missing something?

If this is how it's expected to be, and if we have migrate from our current pythonbrew/venv to conda, then seems like the only option is to not use any of the repos, but build our own local ones, from downloaded respective pips. Any other better option in this case?

@collinsethans
Copy link
Author

Hi @kalefranz Can you have a look at our last msg? We are trying to understand if dependencies across channels are expected to cowork -- we found otherwise.

Thanks.

@msarahan
Copy link
Contributor

You may find the thread at #7684 informative.

@ChrisBarker-NOAA
Copy link

@ping!

I think this issue can be closed, but a note to the OP, and anyone else reading this issue in the future:

  1. conda itself does have a few features designed specifically around the "scipy stack" -- noitably handling numpy versions specifically (thought that's been more generalized in recent versions) -- but for the most part, it's not that conda is designed for numerical computing, it's that conda is designed to address issues that the scientific community has -- i.e. complex non-python dependencies. That feature, though less of an issue for many other communities, is still helpful for virtually anyone using Python. An example from my use, where I am combining numerical computing and web interfaces, is that conda can mange redis and mongodb for me, in a platform independent way -- that's really nice.

  2. The Anaconda distribution, on the other hand, IS focused on the numerical computing community -- so using only that will leave you with gaps.

  3. conda-forge is the solution here :-) -- while also driven much by the numerical computing community, a number of us have been working hard to add more general packages for other use cases (in my case the Pyramid Stack), and as a community-supported project, anyone can contribute the ones they might need that aren't already there.

  4. compatibility between conda-forge and the default channel has gotten a lot better over the years, but it has always worked well, as long as you prioritize conda-forge - there is absolutely no need to maintain your own collection if conda packages.

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Mar 15, 2022
@github-actions
Copy link

Hi again!

This issue has been closed since it has not had recent activity.

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Mar 23, 2022
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Mar 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity source::community catch-all for issues filed by community members stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::support neither a bug nor feature, is really just a user having questions or difficulty somewhere
Projects
None yet
Development

No branches or pull requests

5 participants