I have an app that must be run on python3.6 and I'd prefer to run it on a Unbuntu 16.04 OS. Problem is that eventually python3.6 ends up trolling through /usr/lib/python3 which is already polluted with python3.5 libraries.

I've tried uninstalling python3.5 but packages like cython3 keep pulling it back in. I've looked at pyenv as well as update-alternatives, but I'm not convinced they sanitize the /usr/lib and /usr/include. I'm still seeing python3.6-dev and python3.5-dev conflicts.

Specific repos I'm doing dev on:

I think my specific problem may all be related to cython. Even though I have python3.6-dev installed, the cython package pulls in python3-dev which pulls in python3 which pulls in python3-5, regardless of my 3.6 installs

virtualenv fixed the problem, but there were quite few bumps along the way. Here's what I did:

  1. Uninstalled cython3: (apt-get remove cython3)
  2. Installed Py3.6 and dev: (apt-get install python3.6 python3.6-dev)
  3. Installed VirtualEnv: (python3.6 -m pip install virtualenv)
  4. Launched VirtualEnv: (source $HOME/python3.6/bin/activate)
  5. Built and installed sip-4.19.13 and PyQt5_gpl-5.11.3 from source.
  6. Installed python-trezor and electrum from source.
  7. Launched electrum from VirtualEnv

Most of my problems were related to python3-* distribution packages, and the fact that wheels for 32bit linux are getting more and more rare. This is what predicated the need for me to build PyQt5 and sip. I had them in a distribution package, but those packages always landed into the 3.5 tree, since 3.6 isn't officially supported on Ubuntu 16.04 LTS yet.

I've included the ubuntu16-electrum-git-build.sh script if anyone is interested.

New contributor
Dan is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.