Repository: python-poetry/poetry

Issue:
"Unsupported operand types" on poetry develop
<!--
  Hi there! Thank you for discovering and submitting an issue.

  Before you submit this; let's make sure of a few things.
  Please make sure the following boxes are ticked if they are correct.
  If not, please try and fulfill these first.
-->

<!-- Checked checkbox should look like this: [x] -->
- [X] I am on the [latest](https://github.com/sdispater/poetry/releases/latest) Poetry version.
- [X] I have searched the [issues](https://github.com/sdispater/poetry/issues) of this repo and believe that this is not a duplicate.
- [X] If an exception occurs when executing a command, I executed it again in debug mode (`-vvv` option).

<!--
  Once those are done, if you're able to fill in the following list with your information,
  it'd be very helpful to whoever handles the issue.
-->

- **OS version and name**: ArchLinux
- **Poetry version**: 0.12.2

## Issue
<!-- Now feel free to write your issue, but please be descriptive! Thanks again 🙌 ❤️ -->
A `Path` was probably expected. I'll submit a PR addressing this in a few minutes.

```
$ poetry develop -vvv
                                                      
[TypeError]                            
unsupported operand type(s) for /: 'str' and 'str'  
                                                      
Exception trace:
 /home/cauebs/.local/venvs/poetry/lib/python3.7/site-packages/cleo/application.py in run() at line 94
   status_code = self.do_run(input_, output_)
 /home/cauebs/.local/venvs/poetry/lib/python3.7/site-packages/poetry/console/application.py in do_run() at line 88
   return super(Application, self).do_run(i, o)
 /home/cauebs/.local/venvs/poetry/lib/python3.7/site-packages/cleo/application.py in do_run() at line 197
   status_code = command.run(input_, output_)
 /home/cauebs/.local/venvs/poetry/lib/python3.7/site-packages/poetry/console/commands/command.py in run() at line 77
   return super(BaseCommand, self).run(i, o)
 /home/cauebs/.local/venvs/poetry/lib/python3.7/site-packages/cleo/commands/base_command.py in run() at line 136
   self.initialize(input_, output_)
 /home/cauebs/.local/venvs/poetry/lib/python3.7/site-packages/poetry/console/commands/env_command.py in initialize() at line 16
   o, self.poetry.package.name, cwd=self.poetry.file.parent
 /home/cauebs/.local/venvs/poetry/lib/python3.7/site-packages/poetry/utils/env.py in create_venv() at line 127
   env = cls.get(cwd=cwd)
 /home/cauebs/.local/venvs/poetry/lib/python3.7/site-packages/poetry/utils/env.py in get() at line 120
   return VirtualEnv(prefix, base_prefix)
 /home/cauebs/.local/venvs/poetry/lib/python3.7/site-packages/poetry/utils/env.py in __init__() at line 341
   super(VirtualEnv, self).__init__(path, base)
 /home/cauebs/.local/venvs/poetry/lib/python3.7/site-packages/poetry/utils/env.py in __init__() at line 49
   self._bin_dir = self._path / bin_dir

develop
```


Discussion:

Resolving patch:
diff --git a/poetry/utils/env.py b/poetry/utils/env.py
--- a/poetry/utils/env.py
+++ b/poetry/utils/env.py
@@ -114,7 +114,7 @@ def get(cls, reload=False, cwd=None):  # type: (IO, bool) -> Env
             prefix = Path(os.environ["VIRTUAL_ENV"])
             base_prefix = None
         else:
-            prefix = sys.prefix
+            prefix = Path(sys.prefix)
             base_prefix = cls.get_base_prefix()
 
         return VirtualEnv(prefix, base_prefix)


Test patch: