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

toolchain_activate.sh:3: = not found #49

Open
nehaljwani opened this issue Nov 24, 2018 · 11 comments · May be fixed by #54
Open

toolchain_activate.sh:3: = not found #49

nehaljwani opened this issue Nov 24, 2018 · 11 comments · May be fixed by #54

Comments

@nehaljwani
Copy link
Member

From @Monduiz on November 5, 2018 16:13

Current Behavior

On activating / deactivating environment I receive this message:

/Users/<user>/anaconda3/envs/ds/etc/conda/activate.d/toolchain_activate.sh:3: = not found

On installing a package I receive:

/Users/<user>/anaconda3/envs/ds/etc/conda/deactivate.d/toolchain_deactivate.sh:3: = not found
/Users/<user/anaconda3/envs/ds/etc/conda/activate.d/toolchain_activate.sh:3: = not found

Steps to Reproduce

source activate ds
source deactivate ds
conda install -c conda-forge tensorflow 

Expected Behavior

No message should appear.

Environment Information

`conda info`

active environment : ds
    active env location : /Users/<user>/anaconda3/envs/ds
            shell level : 1
       user config file : /Users/<user>/.condarc
 populated config files : 
          conda version : 4.5.11
    conda-build version : 3.16.1
         python version : 3.6.6.final.0
       base environment : /Users/<user>/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/osx-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/osx-64
                          https://repo.anaconda.com/pkgs/pro/noarch
          package cache : /Users/<user>/anaconda3/pkgs
                          /Users/<user>/.conda/pkgs
       envs directories : /Users/<user>/anaconda3/envs
                          /Users/<user>/.conda/envs
               platform : osx-64
             user-agent : conda/4.5.11 requests/2.19.1 CPython/3.6.6 Darwin/18.2.0 OSX/10.14.1
                UID:GID : 501:20
             netrc file : None
           offline mode : False

`conda config --show-sources`

empty

`conda list --show-channel-urls`

# packages in environment at /Users/<user>/anaconda3/envs/ds:
#
# Name                    Version                   Build  Channel
absl-py                   0.5.0                      py_0    conda-forge
alabaster                 0.7.11                   py36_0    defaults
anaconda                  custom           py36ha4fed55_0    defaults
anaconda-client           1.7.2                    py36_0    defaults
anaconda-project          0.8.2                    py36_0    defaults
appdirs                   1.4.3            py36h28b3542_0    defaults
appnope                   0.1.0            py36hf537a9a_0    defaults
appscript                 1.0.1            py36h1de35cc_1    defaults
asn1crypto                0.24.0                   py36_0    defaults
astor                     0.7.1                      py_0    conda-forge
astroid                   2.0.4                    py36_0    defaults
astropy                   3.0.4            py36h1de35cc_0    defaults
atomicwrites              1.2.1                    py36_0    defaults
attrs                     18.2.0           py36h28b3542_0    defaults
automat                   0.7.0                    py36_0    defaults
babel                     2.6.0                    py36_0    defaults
backcall                  0.1.0                    py36_0    defaults
backports                 1.0                      py36_1    defaults
backports.shutil_get_terminal_size 1.0.0                    py36_2    defaults
beautifulsoup4            4.6.3                    py36_0    defaults
bitarray                  0.8.3            py36h1de35cc_0    defaults
bkcharts                  0.2              py36h073222e_0    defaults
blas                      1.0                         mkl    defaults
blaze                     0.11.3                   py36_0    defaults
bleach                    2.1.4                    py36_0    defaults
blosc                     1.14.4               hd9629dc_0    defaults
bokeh                     0.13.0                   py36_0    defaults
boto                      2.49.0                   py36_0    defaults
bottleneck                1.2.1            py36h1d22016_1    defaults
bzip2                     1.0.6                h1de35cc_5    defaults
c-ares                    1.14.0               h470a237_0    conda-forge
ca-certificates           2018.03.07                    0    defaults
certifi                   2018.10.15               py36_0    defaults
cffi                      1.11.5           py36h6174b99_1    defaults
chardet                   3.0.4                    py36_1    defaults
click                     6.7              py36hec950be_0    defaults
cloudpickle               0.5.5                    py36_0    defaults
clyent                    1.2.2                    py36_1    defaults
colorama                  0.3.9            py36hd29a30c_0    defaults
constantly                15.1.0           py36h28b3542_0    defaults
contextlib2               0.5.5            py36hd66e5e7_0    defaults
cryptography              2.3.1            py36hdbc3d79_0    defaults
curl                      7.61.0               ha441bb4_0    defaults
cycler                    0.10.0           py36hfc81398_0    defaults
cython                    0.28.5           py36h0a44026_0    defaults
cytoolz                   0.9.0.1          py36h1de35cc_1    defaults
dask                      0.19.1                   py36_0    defaults
dask-core                 0.19.1                   py36_0    defaults
datashape                 0.5.4                    py36_1    defaults
dbus                      1.13.2               h760590f_1    defaults
decorator                 4.3.0                    py36_0    defaults
defusedxml                0.5.0                    py36_1    defaults
distributed               1.23.1                   py36_0    defaults
docutils                  0.14             py36hbfde631_0    defaults
entrypoints               0.2.3                    py36_2    defaults
et_xmlfile                1.0.1            py36h1315bdc_0    defaults
expat                     2.2.6                h0a44026_0    defaults
fastcache                 1.0.2            py36h1de35cc_2    defaults
filelock                  3.0.8                    py36_0    defaults
flask                     1.0.2                    py36_1    defaults
flask-cors                3.0.6                    py36_0    defaults
freetype                  2.9.1                hb4e5f40_0    defaults
gast                      0.2.0                      py_0    conda-forge
get_terminal_size         1.0.0                h7520d66_0    defaults
gettext                   0.19.8.1             h15daf44_3    defaults
gevent                    1.3.6            py36h1de35cc_0    defaults
glib                      2.56.2               hd9629dc_0    defaults
glob2                     0.6                      py36_0    defaults
gmp                       6.1.2                hb37e062_1    defaults
gmpy2                     2.0.8            py36h6ef4df4_2    defaults
greenlet                  0.4.15           py36h1de35cc_0    defaults
grpcio                    1.14.1           py36hd60e7a3_0    conda-forge
h5py                      2.8.0            py36h878fce3_3    defaults
hdf5                      1.10.2               hfa1e0ec_1    defaults
heapdict                  1.0.0                    py36_2    defaults
html5lib                  1.0.1                    py36_0    defaults
hyperlink                 18.0.0                   py36_0    defaults
icu                       58.2                 h4b95b61_1    defaults
idna                      2.7                      py36_0    defaults
imageio                   2.4.1                    py36_0    defaults
imagesize                 1.1.0                    py36_0    defaults
incremental               17.5.0                   py36_0    defaults
intel-openmp              2019.0                      118    defaults
ipykernel                 4.9.0                    py36_1    defaults
ipython                   6.5.0                    py36_0    defaults
ipython_genutils          0.2.0            py36h241746c_0    defaults
ipywidgets                7.4.1                    py36_0    defaults
isort                     4.3.4                    py36_0    defaults
itsdangerous              0.24                     py36_1    defaults
jbig                      2.1                  h4d881f8_0    defaults
jdcal                     1.4                      py36_0    defaults
jedi                      0.12.1                   py36_0    defaults
jinja2                    2.10                     py36_0    defaults
jpeg                      9b                   he5867d9_2    defaults
jsonschema                2.6.0            py36hb385e00_0    defaults
jupyter                   1.0.0                    py36_7    defaults
jupyter_client            5.2.3                    py36_0    defaults
jupyter_console           5.2.0                    py36_1    defaults
jupyter_core              4.4.0                    py36_0    defaults
jupyterlab                0.34.9                   py36_0    defaults
jupyterlab_launcher       0.13.1                   py36_0    defaults
keras                     2.2.4                    py36_0    conda-forge
keras-applications        1.0.4                      py_1    conda-forge
keras-preprocessing       1.0.2                      py_1    conda-forge
keyring                   13.2.1                   py36_0    defaults
kiwisolver                1.0.1            py36h0a44026_0    defaults
lazy-object-proxy         1.3.1            py36h1de35cc_2    defaults
libcurl                   7.61.0               hf30b1f0_0    defaults
libcxx                    4.0.1                h579ed51_0    defaults
libcxxabi                 4.0.1                hebd6815_0    defaults
libedit                   3.1.20170329         hb402a30_2    defaults
libffi                    3.2.1                h475c297_4    defaults
libgfortran               3.0.1                h93005f0_2    defaults
libgpuarray               0.7.6                h470a237_3    conda-forge
libiconv                  1.15                 hdd342a3_7    defaults
libpng                    1.6.34               he12f830_0    defaults
libprotobuf               3.6.1                hd28b015_0    conda-forge
libsodium                 1.0.16               h3efe00b_0    defaults
libssh2                   1.8.0                h322a93b_4    defaults
libtiff                   4.0.9                hcb84e12_2    defaults
libxml2                   2.9.8                hab757c2_1    defaults
libxslt                   1.1.32               hb819dd2_0    defaults
llvmlite                  0.24.0           py36hc454e04_0    defaults
locket                    0.2.0            py36hca03003_1    defaults
lxml                      4.2.5            py36hef8c89e_0    defaults
lzo                       2.10                 h362108e_2    defaults
mako                      1.0.7                      py_1    conda-forge
markdown                  2.6.11                     py_0    conda-forge
markupsafe                1.0              py36h1de35cc_1    defaults
matplotlib                2.2.3            py36h54f8f79_0    defaults
mccabe                    0.6.1                    py36_1    defaults
mistune                   0.8.3            py36h1de35cc_1    defaults
mkl                       2019.0                      118    defaults
mkl-service               1.1.2            py36h6b9c3cc_5    defaults
mkl_fft                   1.0.4            py36h5d10147_1    defaults
mkl_random                1.0.1            py36h5d10147_1    defaults
more-itertools            4.3.0                    py36_0    defaults
mpc                       1.1.0                h6ef4df4_1    defaults
mpfr                      4.0.1                h3018a27_3    defaults
mpmath                    1.0.0                    py36_2    defaults
msgpack-python            0.5.6            py36h04f5b5a_1    defaults
multipledispatch          0.6.0                    py36_0    defaults
nbconvert                 5.4.0                    py36_1    defaults
nbformat                  4.4.0            py36h827af21_0    defaults
ncurses                   6.1                  h0a44026_0    defaults
networkx                  2.1                      py36_0    defaults
nltk                      3.3.0                    py36_0    defaults
nose                      1.3.7                    py36_2    defaults
notebook                  5.6.0                    py36_0    defaults
numba                     0.39.0           py36h6440ff4_0    defaults
numexpr                   2.6.8            py36h1dc9127_0    defaults
numpy                     1.15.1           py36h6a91979_0    defaults
numpy-base                1.15.1           py36h8a80b8c_0    defaults
numpydoc                  0.8.0                    py36_0    defaults
odo                       0.5.1            py36hc1af34a_0    defaults
olefile                   0.46                     py36_0    defaults
openpyxl                  2.5.6                    py36_0    defaults
openssl                   1.0.2p               h1de35cc_0    defaults
packaging                 17.1                     py36_0    defaults
pandas                    0.23.4           py36h6440ff4_0    defaults
pandoc                    1.19.2.1             ha5e8f32_1    defaults
pandocfilters             1.4.2                    py36_1    defaults
parso                     0.3.1                    py36_0    defaults
partd                     0.3.8            py36hf5c4cb8_0    defaults
path.py                   11.1.0                   py36_0    defaults
pathlib2                  2.3.2                    py36_0    defaults
patsy                     0.5.0                    py36_0    defaults
pcre                      8.42                 h378b8a2_0    defaults
pep8                      1.7.1                    py36_0    defaults
pexpect                   4.6.0                    py36_0    defaults
pickleshare               0.7.4            py36hf512f8e_0    defaults
pillow                    5.2.0            py36hb68e598_0    defaults
pip                       10.0.1                   py36_0    defaults
pkginfo                   1.4.2                    py36_1    defaults
pluggy                    0.7.1            py36h28b3542_0    defaults
ply                       3.11                     py36_0    defaults
prometheus_client         0.3.1            py36h28b3542_0    defaults
prompt_toolkit            1.0.15           py36haeda067_0    defaults
protobuf                  3.6.1            py36hfc679d8_1    conda-forge
psutil                    5.4.7            py36h1de35cc_0    defaults
ptyprocess                0.6.0                    py36_0    defaults
py                        1.6.0                    py36_0    defaults
pyasn1                    0.4.4            py36h28b3542_0    defaults
pyasn1-modules            0.2.2                    py36_0    defaults
pycodestyle               2.4.0                    py36_0    defaults
pycosat                   0.6.3            py36h1de35cc_0    defaults
pycparser                 2.18                     py36_1    defaults
pycrypto                  2.6.1            py36h1de35cc_9    defaults
pycurl                    7.43.0.2         py36hdbc3d79_0    defaults
pyflakes                  2.0.0                    py36_0    defaults
pygments                  2.2.0            py36h240cd3f_0    defaults
pygpu                     0.7.6            py36h7eb728f_0    conda-forge
pyhamcrest                1.9.0                      py_2    conda-forge
pylint                    2.1.1                    py36_0    defaults
pyodbc                    4.0.24           py36h0a44026_0    defaults
pyopenssl                 18.0.0                   py36_0    defaults
pyparsing                 2.2.0                    py36_1    defaults
pyqt                      5.9.2            py36h655552a_2    defaults
pysocks                   1.6.8                    py36_0    defaults
pytables                  3.4.4            py36h13cba08_0    defaults
pytest                    3.8.0                    py36_0    defaults
pytest-arraydiff          0.2              py36h39e3cac_0    defaults
pytest-astropy            0.4.0                    py36_0    defaults
pytest-doctestplus        0.1.3                    py36_0    defaults
pytest-openfiles          0.3.0                    py36_0    defaults
pytest-remotedata         0.3.0                    py36_0    defaults
python                    3.6.6                hc167b69_0    defaults
python-dateutil           2.7.3                    py36_0    defaults
python.app                2                        py36_8    defaults
pytz                      2018.5                   py36_0    defaults
pywavelets                1.0.0            py36h1d22016_0    defaults
pyyaml                    3.13             py36h1de35cc_0    defaults
pyzmq                     17.1.2           py36h1de35cc_0    defaults
qt                        5.9.6                h45cd832_2    defaults
qtawesome                 0.4.4            py36h468c6fb_0    defaults
qtconsole                 4.4.1                    py36_0    defaults
qtpy                      1.5.0                    py36_0    defaults
readline                  7.0                  h1de35cc_5    defaults
requests                  2.19.1                   py36_0    defaults
rope                      0.11.0                   py36_0    defaults
ruamel_yaml               0.15.46          py36h1de35cc_0    defaults
scikit-image              0.14.0           py36h0a44026_1    defaults
scikit-learn              0.19.2           py36h4f467ca_0    defaults
scipy                     1.1.0            py36h28f7352_1    defaults
seaborn                   0.9.0                    py36_0    defaults
send2trash                1.5.0                    py36_0    defaults
service_identity          17.0.0           py36h28b3542_0    defaults
setuptools                40.2.0                   py36_0    defaults
simplegeneric             0.8.1                    py36_2    defaults
singledispatch            3.4.0.3          py36hf20db9d_0    defaults
sip                       4.19.8           py36h0a44026_0    defaults
six                       1.11.0                   py36_1    defaults
snappy                    1.1.7                he62c110_3    defaults
snowballstemmer           1.2.1            py36h6c7b616_0    defaults
sortedcollections         1.0.1                    py36_0    defaults
sortedcontainers          2.0.5                    py36_0    defaults
sphinx                    1.7.9                    py36_0    defaults
sphinxcontrib             1.0                      py36_1    defaults
sphinxcontrib-websupport  1.1.0                    py36_1    defaults
spyder                    3.3.1                    py36_1    defaults
spyder-kernels            0.2.6                    py36_0    defaults
sqlalchemy                1.2.11           py36h1de35cc_0    defaults
sqlite                    3.24.0               ha441bb4_0    defaults
statsmodels               0.9.0            py36h1d22016_0    defaults
sympy                     1.2                      py36_0    defaults
tblib                     1.3.2            py36hda67792_0    defaults
tensorboard               1.10.0                   py36_0    conda-forge
tensorflow                1.10.0                   py36_0    conda-forge
termcolor                 1.1.0                      py_2    conda-forge
terminado                 0.8.1                    py36_1    defaults
testpath                  0.3.1            py36h625a49b_0    defaults
theano                    1.0.3            py36hfc679d8_1    conda-forge
tk                        8.6.8                ha441bb4_0    defaults
toolchain                 2.3.0                         0    conda-forge
toolchain_c_osx-64        2.3.0                         0    conda-forge
toolchain_cxx_osx-64      2.3.0                         0    conda-forge
toolz                     0.9.0                    py36_0    defaults
tornado                   5.1              py36h1de35cc_0    defaults
tqdm                      4.26.0           py36h28b3542_0    defaults
traitlets                 4.3.2            py36h65bd3ce_0    defaults
twisted                   17.5.0                   py36_0    defaults
typed-ast                 1.1.0            py36h1de35cc_0    defaults
unicodecsv                0.14.1           py36he531d66_0    defaults
unixodbc                  2.3.7                h1de35cc_0    defaults
urllib3                   1.23                     py36_0    defaults
wcwidth                   0.1.7            py36h8c6ec74_0    defaults
webencodings              0.5.1                    py36_1    defaults
werkzeug                  0.14.1                   py36_0    defaults
wheel                     0.31.1                   py36_0    defaults
widgetsnbextension        3.4.1                    py36_0    defaults
wrapt                     1.10.11          py36h1de35cc_2    defaults
xlrd                      1.1.0                    py36_1    defaults
xlsxwriter                1.1.0                    py36_0    defaults
xlwings                   0.11.8                   py36_0    defaults
xlwt                      1.2.0            py36h5ad1178_0    defaults
xz                        5.2.4                h1de35cc_4    defaults
yaml                      0.1.7                hc338f04_2    defaults
zeromq                    4.2.5                h0a44026_1    defaults
zict                      0.1.3                    py36_0    defaults
zlib                      1.2.11               hf3cbc9b_2    defaults
zope                      1.0                      py36_1    defaults
zope.interface            4.5.0            py36h1de35cc_0    defaults

Copied from original issue: conda/conda#7936

@nehaljwani
Copy link
Member Author

From @wwxFromTju on November 9, 2018 9:41

+1

@nehaljwani
Copy link
Member Author

From @Monduiz on November 9, 2018 12:48

After some testing, this appeared after installing keras and tensorflow

@nehaljwani
Copy link
Member Author

From @tedil on November 13, 2018 12:29

I encountered the same issue; I think it's due to the fact that I use zsh instead of bash and the (de)activate.d scripts aren't POSIX compliant, i.e. shell agnostic as stated in #6820.
Specifically, [ a == b ] is the culprit, as explained here. Using double brackets should do the trick.
However, I also have tensorflow and keras installed, so I'll check if that happens even without those two.

@nehaljwani
Copy link
Member Author

From @Monduiz on November 13, 2018 14:19

I also use zsh

@nehaljwani
Copy link
Member Author

From @HaleTom on November 18, 2018 11:10

@tedil It's not due to zsh, as the top line is #!/bin/bash.

The solution is to either use [[ ]] or a single =.

@nehaljwani
Copy link
Member Author

From @oleastre on November 19, 2018 11:22

@HaleTom to use the activate scripts, you source them, not execute them. Which means that the top line #!/bin/bash is simply ignored.
When you source activate via zsh, it executes the content of the activate file using the zsh interpreter. And as activate itself sources the toolchain_activate.sh script, the content of toolchain_activate.sh is executed by the zsh interpreter.

@khughitt
Copy link

@nehaljwani Do you know if this issue is still being tracked somewhere?

@Tusko
Copy link

Tusko commented Jan 9, 2019

How to fix it?

nehaljwani added a commit to nehaljwani/toolchain-feedstock that referenced this issue Jan 9, 2019
@nehaljwani nehaljwani linked a pull request Jan 9, 2019 that will close this issue
5 tasks
@nehaljwani
Copy link
Member Author

I have opened up #54 to fix this.

@brandonwillard
Copy link
Member

Locally, in my .zshrc, I changed the conda activation steps to source the script using

emulate bash -c '. $ANACONDA_HOME/etc/profile.d/conda.sh'

and that seems to work (for env activation, at least).

@kevinUCeqEng
Copy link

kevinUCeqEng commented Sep 8, 2019

Thank you @nehaljwani and @brandonwillard - I am a zsh user and encountered this same issue after installing Keras and TensorFlow. I replaced source [...] conda.sh with emulate bash [...] conda.sh in my .zshrc script and it worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants