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

conda install fails #319

Closed
sanand0 opened this issue Oct 30, 2020 · 2 comments
Closed

conda install fails #319

sanand0 opened this issue Oct 30, 2020 · 2 comments
Labels
doc Documentation of implemented features

Comments

@sanand0
Copy link
Contributor

sanand0 commented Oct 30, 2020

I created a new ubuntu docker instance and ran it via docker run -it --name ubuntu ubuntu /bin/bash.

Then I ran

wget https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.3-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p gramex-offline
gramex-offline/bin/conda install -y -c conda-forge -c gramener gramex

It raised the following error:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(700): An error occurred while installing package 'gramener::gramex-1.64.0-py37_1'.
Rolling back transaction: done

LinkError: post-link script failed for package gramener::gramex-1.64.0-py37_1
location of failed script: /gramex-offline/bin/.gramex-post-link.sh
==> script messages <==
<None>
==> script output <==
stdout: yarn config v1.22.10
success Set "ignore-engines" to "true".
Done in 0.05s.

stderr:
Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --use-feature

Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --use-feature

Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --use-feature

Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --use-feature

Usage:   
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --use-feature
Traceback (most recent call last):
  File "/gramex-offline/bin/gramex", line 7, in <module>
    from gramex import commandline
  File "/gramex-offline/lib/python3.7/site-packages/gramex/__init__.py", line 36, in <module>
    from orderedattrdict import AttrDict
ModuleNotFoundError: No module named 'orderedattrdict'

@jaidevd -- are you able to reproduce this?

@jaidevd
Copy link
Member

jaidevd commented Oct 30, 2020

Yes. The recipe uses the --use-feature option in pip - which is available only in pip >= 20.2.4. Miniconda3-py37_4.8.3 is too old to have that version of pip by default.

On any fresh build environment, start by:

$CONDA_PREFIX/bin/pip install --upgrade pip

@sanand0
Copy link
Contributor Author

sanand0 commented Oct 30, 2020

The following steps work:

# Install Miniconda
wget https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.3-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p gramex-offline
gramex-offline/bin/conda init bash

# Now RESTART the shell to activate Conda.

# Then install Gramex
conda create -y --name gramex python=3.7            # Create a new environment
conda activate gramex                               # Activate it
conda install -y -c conda-forge -c gramener gramex  # Install Gramex

I missed the conda activate gramex in the docs. Also, looks like Miniconda3-py37_4.8.3 does have pip > 20.2.4 provided I run the conda activate.

Have updated this on the guide. Thanks!

@sanand0 sanand0 closed this as completed Oct 30, 2020
@sanand0 sanand0 added the doc Documentation of implemented features label Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Documentation of implemented features
Projects
None yet
Development

No branches or pull requests

2 participants