[question] How to use poetry on Ubuntu?
See original GitHub issueI made a poetry-based project on Manjaro, where python3 is the default.
On another machine, which has Ubuntu 18.04, I wanted to re-create the virt. env. but I got the following error:
$ poetry install
/home/jabba/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
"program uses threads.", RuntimeWarning)
[RuntimeError]
The current Python version (2.7.15) is not supported by the project (^3.6)
Please activate a compatible Python version.
Under my Ubuntu python points to Python 2.7, it’s true, but Ubuntu has a python3 symlink that points to Python 3.6.
I think poetry should pick Python 3 automatically. But anyway, how can I create a Python 3 virt. env. in this case? Thanks.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:18 (6 by maintainers)
Top Results From Across the Web
Python Poetry tutorial: How to use Python Poetry - YouTube
This short Python Poetry tutorial is about installation Poetry on Ubuntu -based Linux distribution, how to create a Python project with ...
Read more >How To Install Poetry to Manage Python Dependencies on ...
Poetry is installed using an official installation script provided on the Poetry website. This command will download the installation script, ...
Read more >python poetry how to install for all users ubuntu 18.04?
this is how I solved it: # copy poetry bin and lib to /usr/local/bin and /usr/local/lib $ cd ~/.local/lib/python3.8/site-packages $ sudo cp ...
Read more >Dependency Management With Python Poetry
Learn how Python Poetry will help you start new projects, maintain existing ones, and master dependency management.
Read more >Poetry installation fails on Ubuntu - command line
You add ~/poetry/bin to PATH , but it should be ~/.poetry/bin . Regarding python is not available, you can (re)install python-is-python3 package ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK, I found a way (using https://github.com/sdispater/poetry/issues/721):
Install with Python 3:
Then edit the file
~/.poetry/bin/poetry
and change the first line to:That is,
python
is changed topython3
.The bad news is that if you update poetry to a new version, this change will be overwritten very likely.
this workaround is not working for me on ubuntu 18.04