question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot install on Ubuntu 16.04, on both python 2 and 3

See original GitHub issue
> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial

I’m using the distro packages for Python and Pip:

 > python3 --version
 Python 3.5.2
 > pip3 --version
 pip 8.1.1 from /usr/lib/python3/dist-packages (python 3.5)
 > python --version
 Python 2.7.12
 > pip --version
 pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)

I know that pip complains about it not being the latest version, but I think the installation should still work, right?

By complains I mean this:

You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Anyway:

 > curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python

and

 > curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python3

both end up with this:

Retrieving metadata

Installing version: 0.9.0
 - Getting dependencies
[... output truncated by me...]
Successfully built pyrsistent toml cachecontrol functools32 scandir pastel msgpack-python
Installing collected packages: typing, functools32, jsonschema, six, scandir, pathlib2, first, click, pip-tools, certifi, chardet, idna, urllib3, requests, pylev, pastel, cleo, pyrsistent, virtualenv, cachy, pyparsing, toml, msgpack-python, lockfile, cachecontrol, requests-toolbelt, pkginfo, poetry
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 335, in run
    prefix=options.prefix_path,
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 732, in install
    **kwargs
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 837, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 1039, in move_wheel_files
    isolated=self.isolated,
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 247, in move_wheel_files
    prefix=prefix,
  File "/usr/lib/python2.7/dist-packages/pip/locations.py", line 153, in distutils_scheme
    i.finalize_options()
  File "/usr/share/python-wheels/setuptools-20.7.0-py2.py3-none-any.whl/setuptools/command/install.py", line 38, in finalize_options
    orig.install.finalize_options(self)
  File "/usr/lib/python2.7/distutils/command/install.py", line 289, in finalize_options
    raise DistutilsOptionError("can't combine user with prefix, "
DistutilsOptionError: can't combine user with prefix, exec_prefix/home, or install_(plat)base

😢

(Edit: pip3 install --user poetry worked. I’ll leave the issue here and you can close it if you want. I’d say that the default installation instructions should work.)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
sdispatercommented, Jul 24, 2018

The Poetry documentation will never recommend installing with sudo since this is a bad practice most of the time. If one wants to install it this way they can and are free do to so.

Nonetheless, Poetry installation is still a pain point and is something that needs to be tackled before Poetry can reach version 1.0.

I want the installer to make Poetry self-sufficient and self-updatable without hitting permissions issues.

The only way to achieve that is to install it in the user directory. For instance, cargo for Rust is installed in the ~/.cargo directory.

2reactions
BorePlusPluscommented, Jun 17, 2018

I am experiencing the issue on ubuntu 18.04

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I install the latest Python 2.7.X or 3.X on Ubuntu?
First, install some dependencies: sudo apt-get install build-essential checkinstall sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev ...
Read more >
How To Install Python 3 and Set Up a Local Programming ...
This tutorial will guide you through installing Python 3 on your local Linux machine and setting up a programming environment via the command ......
Read more >
Installing Python 3.8.3 on Ubuntu 16.04, change the default ...
Installing Python 3.8.3 on Ubuntu 16.04, change the default version of python to the new version, and why is my terminal not working....
Read more >
ubuntu broken python installation by mistake - Stack Overflow
I've tried this for Ubuntu 16.04, with working Python2.7 installation but not with Python3, or Python3.5. The original installation I've was ...
Read more >
Installing and running Python 2 & 3 in Ubuntu Linux - YouTube
How to install Python 2 and Python 3 in Ubuntu Linux, and how to write Python programs in Atom and run them at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found