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 run fails when running a python file containing input (reading from stdin) #9572

Closed
Tracked by #11316
DonJayamanne opened this issue Jan 8, 2020 · 6 comments
Closed
Tracked by #11316
Labels
duplicate::primary if an issue/PR has duplicates, this is the consolidated, primary issue/PR locked [bot] locked due to inactivity plugins::run pertains to conda-run source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type

Comments

@DonJayamanne
Copy link

Current Behavior

  • Create a python file as follows:
import time
x = input("Hello")
print(x)
ERROR conda.cli.main_run:execute(30): Subprocess for 'conda run ['python', 'two.py']' command failed.  (See above for error)
Hello
Traceback (most recent call last):
  File "two.py", line 2, in <module>
    x = input("Hello")
EOFError: EOF when reading a line

Steps to Reproduce


Expected Behavior

Running python files with input should work when using conda run.
It used to work in conda version 4.7.12 and doesn't anymore in 4.8.1

Environment Information

`conda info`

     active environment : None
            shell level : 0
       user config file : /Users/donjayamanne/.condarc
 populated config files : /Users/donjayamanne/.condarc
          conda version : 4.8.1
    conda-build version : not installed
         python version : 3.7.4.final.0
       virtual packages : __osx=10.15.2
       base environment : /Users/donjayamanne/miniconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/donjayamanne/miniconda3/pkgs
                          /Users/donjayamanne/.conda/pkgs
       envs directories : /Users/donjayamanne/miniconda3/envs
                          /Users/donjayamanne/.conda/envs
               platform : osx-64
             user-agent : conda/4.8.1 requests/2.22.0 CPython/3.7.4 Darwin/19.2.0 OSX/10.15.2
                UID:GID : 501:20
             netrc file : None
           offline mode : False

`conda config --show-sources`

==> /Users/donjayamanne/.condarc <==
auto_activate_base: False

`conda list --show-channel-urls`

# packages in environment at /Users/donjayamanne/miniconda3:
#
# Name                    Version                   Build  Channel
asn1crypto                1.2.0                    py37_0    defaults
ca-certificates           2019.11.27                    0    defaults
certifi                   2019.11.28               py37_0    defaults
cffi                      1.13.2           py37hb5b8e2f_0    defaults
chardet                   3.0.4                 py37_1003    defaults
conda                     4.8.1                    py37_0    defaults
conda-package-handling    1.6.0            py37h1de35cc_0    defaults
cryptography              2.8              py37ha12b0ac_0    defaults
idna                      2.8                      py37_0    defaults
libcxx                    4.0.1                hcfea43d_1    defaults
libcxxabi                 4.0.1                hcfea43d_1    defaults
libedit                   3.1.20181209         hb402a30_0    defaults
libffi                    3.2.1                h475c297_4    defaults
ncurses                   6.1                  h0a44026_1    defaults
openssl                   1.1.1d               h1de35cc_3    defaults
pip                       19.3.1                   py37_0    defaults
pycosat                   0.6.3            py37h1de35cc_0    defaults
pycparser                 2.19                     py37_0    defaults
pyopenssl                 19.1.0                   py37_0    defaults
pysocks                   1.7.1                    py37_0    defaults
python                    3.7.4                h359304d_1    defaults
python.app                2                        py37_9    defaults
readline                  7.0                  h1de35cc_5    defaults
requests                  2.22.0                   py37_1    defaults
ruamel_yaml               0.15.87          py37h1de35cc_0    defaults
setuptools                44.0.0                   py37_0    defaults
six                       1.13.0                   py37_0    defaults
sqlite                    3.30.1               ha441bb4_0    defaults
tk                        8.6.8                ha441bb4_0    defaults
tqdm                      4.40.2                     py_0    defaults
urllib3                   1.25.7                   py37_0    defaults
wheel                     0.33.6                   py37_0    defaults
xz                        5.2.4                h1de35cc_4    defaults
yaml                      0.1.7                hc338f04_2    defaults
zlib                      1.2.11               h1de35cc_3    defaults

@DonJayamanne DonJayamanne changed the title Conda run fails when running a python file containing input Conda run fails when running a python file containing input (reading from stdin) Jan 8, 2020
@kalefranz kalefranz added plugins::run pertains to conda-run source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type labels Apr 27, 2020
@technic
Copy link

technic commented May 8, 2020

I can confirm.

@zhc7
Copy link

zhc7 commented Aug 13, 2020

I'm having the same issue

@jonashaag
Copy link
Contributor

Also have this issue

@IvanPalm
Copy link

IvanPalm commented Dec 2, 2020

Same here. Having that issue while running a docker image. Any solution to that?

@odelalleau
Copy link

Same here. Having that issue while running a docker image. Any solution to that?

Potential workaround: conda run --no-capture-output

@kenodegard
Copy link
Contributor

Confirming this issue is resolved by using the --no-capture-output argument.

@kenodegard kenodegard added the duplicate::primary if an issue/PR has duplicates, this is the consolidated, primary issue/PR label Mar 10, 2022
@kenodegard kenodegard mentioned this issue Mar 10, 2022
12 tasks
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Mar 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate::primary if an issue/PR has duplicates, this is the consolidated, primary issue/PR locked [bot] locked due to inactivity plugins::run pertains to conda-run source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants