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

Build failure with a virtualenv error #10047

Closed
Bilokin opened this issue Feb 20, 2023 · 5 comments
Closed

Build failure with a virtualenv error #10047

Bilokin opened this issue Feb 20, 2023 · 5 comments

Comments

@Bilokin
Copy link

Bilokin commented Feb 20, 2023

Hello everyone,

I have a build failure with a virtualenv error for a project which uses conda:

python -mvirtualenv $READTHEDOCS_VIRTUALENV_PATH
SystemExit: 2
usage: virtualenv [--version] [--with-traceback] [-v | -q] [--read-only-app-data] [--app-data APP_DATA] [--reset-app-data] [--upgrade-embed-wheels] [--discovery {builtin}] [-p py] [--try-first-with py_exe]
                  [--creator {builtin,cpython3-posix,venv}] [--seeder {app-data,pip}] [--no-seed] [--activators comma_sep_list] [--clear] [--no-vcs-ignore] [--system-site-packages] [--symlinks | --copies] [--no-download | --download]
                  [--extra-search-dir d [d ...]] [--pip version] [--setuptools version] [--wheel version] [--no-pip] [--no-setuptools] [--no-wheel] [--no-periodic-update] [--symlink-app-data] [--prompt prompt] [-h]
                  dest
virtualenv: error: the following arguments are required: dest

I think this error is related to this recent PR.: #9971

Is there a problem in my setup?
Or do I need to set READTHEDOCS_VIRTUALENV_PATH environment variable value from now on?

Details

My readthedocs.yaml:

---
version: 2
formats: all
conda:
  environment: .environment.yml
build:
  os: ubuntu-22.04
  tools:
    python: "3.8"

python:
  install:
    - method: pip
      path: .

My environment.yaml:

name: rtd38
channels:
  - conda-forge
  - defaults
dependencies:
  - python>=3.8

Related #9008

@ericholscher
Copy link
Member

Thanks for the issue. Can you link to the build where this is happening?

@Bilokin
Copy link
Author

Bilokin commented Feb 21, 2023

@humitos
Copy link
Member

humitos commented Feb 21, 2023

When using Conda, you should specify conda in the build.tools.python config:

build:
  os: ubuntu-22.04
  tools:
    python: "miniconda3-4.7"  # or, ideally, "mambaforge-4.10"

Can you try updating your config file and building again?

@Bilokin
Copy link
Author

Bilokin commented Feb 21, 2023

Thanks, this worked! Is it possible to catch the error I got and output a suggestion to use that parameter value in yaml instead? It can be helpful for other users.

@ericholscher
Copy link
Member

Great, we have added this note in #9008, and I've put it in our Q2 roadmap for this year 👍 That issue is where we'll track fixing it.

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

3 participants