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

FileNotFoundError when using add command on Windows #6

Closed
monkeez opened this issue Mar 6, 2018 · 4 comments
Closed

FileNotFoundError when using add command on Windows #6

monkeez opened this issue Mar 6, 2018 · 4 comments
Labels
kind/bug Something isn't working as expected

Comments

@monkeez
Copy link
Contributor

monkeez commented Mar 6, 2018

I've got Poetry installed using pipsi to keep it self contained from my system Python. I create a new project using Poetry then make a new virtualenv for it using Pew which launches a subshell in the new virtualenv. From there I run poetry add pendulum, that's when I get the error, and no packages have been installed.

Here's the output:

E:\>cd tools/code

E:\tools\code>poetry new example
Created package example in example

E:\tools\code>cd example

E:\tools\code\example>pew new example-env
Using real prefix 'C:\\Users\\mitchell\\AppData\\Local\\Programs\\Python\\Python
36-32'
New python executable in C:\Users\mitchell\.virtualenvs\example-env\Scripts\pyth
on.exe
Installing setuptools, pip, wheel...done.
Launching subshell in virtual environment. Type 'exit' to return.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

E:\tools\code\example>poetry add pendulum
Using version ^1.4 for pendulum

Updating dependencies
Resolving dependencies.....


Package operations: 9 installs, 0 updates, 0 removals

Writing lock file

  - Installing py (1.5.2)


  [FileNotFoundError]
  [WinError 2] The system cannot find the file specified


add [-D|--dev] [--optional] [--dry-run] [--] <name> (<name>)...
@sdispater
Copy link
Member

Thanks for reporting this!

At the moment, poetry has not been tested on Windows. This is in the works, however :-)

Could you execute the command again by passing the -v option (verbose) to get the full stacktrace? It would help a lot in debugging.

@sdispater sdispater added the kind/bug Something isn't working as expected label Mar 6, 2018
@monkeez
Copy link
Contributor Author

monkeez commented Mar 7, 2018

Here it is with verbose mode on. I figured it might have something to do with Windows, it's usually the case with these things 😄

E:\tools\code\example>poetry add pendulum -v
Using version ^1.4 for pendulum

Updating dependencies
Resolving dependencies..........


Package operations: 9 installs, 0 updates, 0 removals

Writing lock file

  - Installing py (1.5.2)


  [FileNotFoundError]
  [WinError 2] The system cannot find the file specified


Exception trace:
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\cleo\application.py in
run() at line 95
   status_code = self.do_run(input_, output_)
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\poetry\console\applicat
ion.py in do_run() at line 60
   return super().do_run(i, o)
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\cleo\application.py in
do_run() at line 188
   status_code = command.run(input_, output_)
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\poetry\console\commands
\command.py in run() at line 24
   return super(BaseCommand, self).run(i, o)
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\cleo\commands\base_comm
and.py in run() at line 146
   status_code = self.execute(input_, output_)
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\cleo\commands\command.p
y in execute() at line 108
   return self.handle()
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\poetry\console\commands
\add.py in handle() at line 79
   status = installer.run()
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\poetry\installation\ins
taller.py in run() at line 53
   self._do_install(local_repo)
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\poetry\installation\ins
taller.py in _do_install() at line 207
   self._execute(op)
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\poetry\installation\ins
taller.py in _execute() at line 215
   getattr(self, f'_execute_{method}')(operation)
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\poetry\installation\ins
taller.py in _execute_install() at line 227
   self._installer.install(operation.package)
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\poetry\installation\pip
_installer.py in install() at line 17
   self.run(*args)
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\poetry\installation\pip
_installer.py in run() at line 30
   return self._venv.run('pip', *args)
 c:\users\mitchell\.local\venvs\poetry\lib\site-packages\poetry\utils\venv.py in
 run() at line 81
   output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
 C:\Users\mitchell\AppData\Local\Programs\Python\Python36-32\Lib\subprocess.py i
n check_output() at line 336
   **kwargs).stdout
 C:\Users\mitchell\AppData\Local\Programs\Python\Python36-32\Lib\subprocess.py i
n run() at line 403
   with Popen(*popenargs, **kwargs) as process:
 C:\Users\mitchell\AppData\Local\Programs\Python\Python36-32\Lib\subprocess.py i
n __init__() at line 709
   restore_signals, start_new_session)
 C:\Users\mitchell\AppData\Local\Programs\Python\Python36-32\Lib\subprocess.py i
n _execute_child() at line 997
   startupinfo)

add [-D|--dev] [--optional] [--dry-run] [--] <name> (<name>)...

@monkeez
Copy link
Contributor Author

monkeez commented Mar 20, 2018

Between when I posted the original issue and now this seems to have been fixed as I'm no longer getting this error.

@monkeez monkeez closed this as completed Mar 20, 2018
radoering pushed a commit to radoering/poetry that referenced this issue Jan 19, 2022
Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants