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

Version 0.8 breaks conda invocation on Linux #74

Closed
brandon-leapyear opened this issue May 4, 2021 · 19 comments
Closed

Version 0.8 breaks conda invocation on Linux #74

brandon-leapyear opened this issue May 4, 2021 · 19 comments

Comments

@brandon-leapyear
Copy link

brandon-leapyear commented May 4, 2021

Running tox in CI shows an error:

conda: error: argument command: invalid choice: '/home/circleci/miniconda/bin/conda'
(choose from 'info', 'help', 'list', 'search', 'create', 'install', 'update', 'upgrade',
'remove', 'uninstall', 'config', 'clean', 'package')

This only happens in CI; locally on Mac with 0.8 works fine.

OS: Debian 8 (Docker image: circleci/python:3.6.3)
miniconda version: 4.3.31

Full output log
$ PATH=/home/circleci/miniconda/bin:$PATH python/tox.sh -edocs -vvvvvv

using tox.ini: /home/circleci/project/python/tox.ini (pid 1517)
removing /home/circleci/project/python/.tox/log
could not satisfy requires PackageNotFoundError('tox-conda',)
could not satisfy requires PackageNotFoundError('tox-wheel',)
using tox-3.23.0 from /usr/local/lib/python3.6/site-packages/tox/init.py (pid 1517)
/usr/local/bin/python (/usr/local/bin/python) is {'executable': '/usr/local/bin/python', 'implementation': 'CPython', 'version_info': [3, 6, 3, 'final', 0], 'version': '3.6.3 (default, Dec 12 2017, 16:40:53) \n[GCC 4.9.2]', 'is_64': True, 'sysplatform': 'linux', 'extra_version_info': None}
.tox uses /usr/local/bin/python
.tox start: getenv /home/circleci/project/python/.tox/.tox
.tox reusing: /home/circleci/project/python/.tox/.tox
.tox finish: getenv /home/circleci/project/python/.tox/.tox after 0.04 seconds
.tox start: finishvenv
.tox finish: finishvenv after 0.00 seconds
.tox start: provision
[1603] /home/circleci/project$ /home/circleci/project/python/.tox/.tox/bin/python -m tox -c python/tox.ini -edocs -vvvvvv
using tox.ini: /home/circleci/project/python/tox.ini (pid 1603)
using tox-3.23.0 from /home/circleci/project/python/.tox/.tox/lib/python3.6/site-packages/tox/init.py (pid 1603)
docs start: packaging
docs cannot reuse: no previous config /home/circleci/project/python/.tox/docs/.tox-config1
docs create: /home/circleci/project/python/.tox/docs
removing /home/circleci/project/python/.tox/docs
[1985] /home/circleci/project$ /home/circleci/miniconda/bin/conda -h >python/.tox/log/docs-0.log
python (/home/circleci/miniconda/bin/python) is {'executable': '/home/circleci/miniconda/bin/python', 'implementation': 'CPython', 'version_info': [3, 6, 3, 'final', 0], 'version': '3.6.3 |Anaconda, Inc.| (default, Nov 20 2017, 20:41:42) \n[GCC 7.2.0]', 'is_64': True, 'sysplatform': 'linux', 'extra_version_info': None}
docs uses None
setting PATH=/home/circleci/project/python/.tox/docs/bin:/home/circleci/miniconda/bin:/home/circleci/miniconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
[1991] /home/circleci/project/python/.tox$ /home/circleci/miniconda/bin/conda create --yes -p docs python=3.9 >log/docs-1.log
docs uses /home/circleci/project/python/.tox/docs/bin/python
docs installdeps: -rrequirements/docs-requirements.txt, -crequirements/docs-constraints.txt
setting PATH=/home/circleci/project/python/.tox/docs/bin:/home/circleci/miniconda/bin:/home/circleci/miniconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
[2013] /home/circleci/project/python$ /home/circleci/project/python/.tox/docs/bin/python -m pip install -rrequirements/docs-requirements.txt -crequirements/docs-constraints.txt
usage: conda [-h] [-V] command ...
conda: error: argument command: invalid choice: '/home/circleci/miniconda/bin/conda' (choose from 'info', 'help', 'list', 'search', 'create', 'install', 'update', 'upgrade', 'remove', 'uninstall', 'config', 'clean', 'package')
ERROR: invocation failed (exit code 2)
docs wheel-make: cleaning up build directory ...
docs start: wheel-make
docs wheel-make: commands[0] | python /home/circleci/project/python/setup.py bdist_wheel --dist-dir /home/circleci/project/python/.tox/dist
setting PATH=/home/circleci/project/python/.tox/docs/bin:/home/circleci/miniconda/bin:/home/circleci/miniconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
[2018] /home/circleci/project/python$ /home/circleci/project/python/.tox/docs/bin/python setup.py bdist_wheel --dist-dir /home/circleci/project/python/.tox/dist
usage: conda [-h] [-V] command ...
conda: error: argument command: invalid choice: '/home/circleci/miniconda/bin/conda' (choose from 'info', 'help', 'list', 'search', 'create', 'install', 'update', 'upgrade', 'remove', 'uninstall', 'config', 'clean', 'package')
ERROR: InvocationError for command /home/circleci/project/python/.tox/docs/bin/python setup.py bdist_wheel --dist-dir /home/circleci/project/python/.tox/dist (exited with code 2)
docs finish: wheel-make after 0.28 seconds
ERROR: No dist directory found. Please check setup.py, e.g with:
python setup.py bdist_wheel
.tox finish: provision after 6.17 seconds

@gaborbernat
Copy link
Member

cc @AntoineD

@AntoineD
Copy link
Collaborator

AntoineD commented May 4, 2021

The conda run command seems available since conda version 3.6.0 in 2014.
What is you version of conda?

@brandon-leapyear
Copy link
Author

brandon-leapyear commented May 4, 2021

This is an old work account. Please reference @brandonchinn178 for all future communication


I put it in the description. 4.3.31

@AntoineD
Copy link
Collaborator

AntoineD commented May 4, 2021

This is probably the version of miniconda, not of the conda command line tool.
What gives conda --version?

@brandon-leapyear
Copy link
Author

brandon-leapyear commented May 4, 2021

This is an old work account. Please reference @brandonchinn178 for all future communication


$ /home/circleci/miniconda/bin/conda --version
conda 4.3.31

@AntoineD
Copy link
Collaborator

AntoineD commented May 4, 2021

What gives conda --help?

@brandon-leapyear
Copy link
Author

brandon-leapyear commented May 4, 2021

This is an old work account. Please reference @brandonchinn178 for all future communication


I don't have the CI environment anymore, but on Mac, I get

usage: conda [-h] [-V] command ...

conda is a tool for managing and deploying applications, environments and packages.

Options:

positional arguments:
  command
    info         Display information about current conda install.
    help         Displays a list of available conda commands and their help
                 strings.
    list         List linked packages in a conda environment.
    search       Search for packages and display their information. The input
                 is a Python regular expression. To perform a search with a
                 search string that starts with a -, separate the search from
                 the options with --, like 'conda search -- -h'. A * in the
                 results means that package is installed in the current
                 environment. A . means that package is not installed but is
                 cached in the pkgs directory.
    create       Create a new conda environment from a list of specified
                 packages.
    install      Installs a list of packages into a specified conda
                 environment.
    update       Updates conda packages to the latest compatible version. This
                 command accepts a list of package names and updates them to
                 the latest versions that are compatible with all other
                 packages in the environment. Conda attempts to install the
                 newest versions of the requested packages. To accomplish
                 this, it may update some packages that are already installed,
                 or install additional packages. To prevent existing packages
                 from updating, use the --no-update-deps option. This may
                 force conda to install older versions of the requested
                 packages, and it does not prevent additional dependency
                 packages from being installed. If you wish to skip dependency
                 checking altogether, use the '--force' option. This may
                 result in an environment with incompatible packages, so this
                 option must be used with great caution.
    upgrade      Alias for conda update. See conda update --help.
    remove       Remove a list of packages from a specified conda environment.
    uninstall    Alias for conda remove. See conda remove --help.
    config       Modify configuration values in .condarc. This is modeled
                 after the git config command. Writes to the user .condarc
                 file (/Users/bchinn/.condarc) by default.
    clean        Remove unused packages and caches.
    package      Low-level conda package utility. (EXPERIMENTAL)

optional arguments:
  -h, --help     Show this help message and exit.
  -V, --version  Show the conda version number and exit.

other commands, such as "conda build", are available when additional conda
packages (e.g. conda-build) are installed

I doubt it's the conda CLI interface, since 0.8 works on Mac

@AntoineD
Copy link
Collaborator

AntoineD commented May 4, 2021

It looks like the conda run command had been removed around conda 4.0.9 (issue, issue) and put back somewhere between conda versions 4.6 and 4.7.
It is not clear to me when that happened exactly though ...

@brandon-leapyear
Copy link
Author

brandon-leapyear commented May 4, 2021

This is an old work account. Please reference @brandonchinn178 for all future communication


Why does it work on Mac then? conda run shouldn't exist on Mac either

@AntoineD
Copy link
Collaborator

AntoineD commented May 4, 2021

What is your version of conda on Mac?

@brandon-leapyear
Copy link
Author

brandon-leapyear commented May 4, 2021

This is an old work account. Please reference @brandonchinn178 for all future communication


The same

@ailin-nemui

This comment has been minimized.

@AntoineD
Copy link
Collaborator

AntoineD commented May 4, 2021

@ailin-nemui
This looks like to be a different problem, would you mind to create a separate issue please?

@AntoineD
Copy link
Collaborator

AntoineD commented May 4, 2021

@brandon-leapyear
I guess you may have to update your conda.

@brandon-leapyear
Copy link
Author

brandon-leapyear commented May 4, 2021

This is an old work account. Please reference @brandonchinn178 for all future communication


What does it work on Mac but not Linux?

@AntoineD
Copy link
Collaborator

AntoineD commented May 4, 2021

I'm sorry but I have no idea and I cannot test on a Mac.

@brandon-leapyear
Copy link
Author

brandon-leapyear commented May 4, 2021

This is an old work account. Please reference @brandonchinn178 for all future communication


well we solved it by pinning tox-conda to < 0.8. It would be nice if tox-conda could specify (at least in README and/or CHANGELOG) what version of miniconda it requires

@AntoineD
Copy link
Collaborator

AntoineD commented May 4, 2021

Will do once I've figured out which versions of conda provide it!

@AntoineD
Copy link
Collaborator

AntoineD commented May 7, 2021

Closing now the docs has been updated.

@AntoineD AntoineD closed this as completed May 7, 2021
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

No branches or pull requests

4 participants