I have inbuilt python 2.7 and pip. I am wondering if there is anyway I can install python3 and then make a virtualenv using python3.


If you have build tools installed, you can download Python 3 sources and compile them, and then put the executable on your $PATH.

|improve this answer|||||
  • 1
    To add to this answer, it'll also be necessary to set the location of where the python libraries are compiled to the LD_LIBRARY_PATH environment variable. Also, if there are any dependencies, you'll need to build those from source as well and add the executable to $PATH and libraries to LD_LIBRARY_PATH. – Nasir Riley Jun 10 '18 at 19:28
  • I tried that, it seemed like it installed successfully with a whole bunch of warnings but there were a lot of issues that came up when i was using it. Like this: from _bz2 import BZ2Compressor, BZ2Decompressor ModuleNotFoundError: No module named '_bz2' – nikithashr Jun 11 '18 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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