How do I force offlineimap to use python2.7? The Next CEO of Stack OverflowUnable to use OfflineIMAP to sync Gmaillinking problems when installing python module and dependencies as non-rootPython not recognizing LD_LIBRARY_PATH?lxml with custom install location for libxml2/libxslt doesn't find correct locationPython now thinks arguments are files: Broken emerge, pip, livestreamer and most tools using PythonJenkins, Python and rootNot able to import cv2 in python2How do I install R on Debian Stretch, given the r-api-3 issue?certbot and awscli require different versions of botocoreimport error fabric.api

What's the best way to handle refactoring a big file?

Inappropriate reference requests from Journal reviewers

Which kind of appliances can one connect to electric sockets located in an airplane's toilet?

Real integral using residue theorem - why doesn't this work?

If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?

Is 'diverse range' a pleonastic phrase?

Rotate a column

How do scammers retract money, while you can’t?

Unreliable Magic - Is it worth it?

Is micro rebar a better way to reinforce concrete than rebar?

Interfacing a button to MCU (and PC) with 50m long cable

Make solar eclipses exceedingly rare, but still have new moons

Can we say or write : "No, it'sn't"?

Written every which way

If/When UK leaves the EU, can a future goverment conduct a referendum to join the EU?

Novel about a guy who is possessed by the divine essence and the world ends?

How do we know the LHC results are robust?

In excess I'm lethal

Sending manuscript to multiple publishers

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

"In the right combination" vs "with the right combination"?

How to prevent changing the value of variable?

Bold, vivid family

Can I run my washing machine drain line into a condensate pump so it drains better?



How do I force offlineimap to use python2.7?



The Next CEO of Stack OverflowUnable to use OfflineIMAP to sync Gmaillinking problems when installing python module and dependencies as non-rootPython not recognizing LD_LIBRARY_PATH?lxml with custom install location for libxml2/libxslt doesn't find correct locationPython now thinks arguments are files: Broken emerge, pip, livestreamer and most tools using PythonJenkins, Python and rootNot able to import cv2 in python2How do I install R on Debian Stretch, given the r-api-3 issue?certbot and awscli require different versions of botocoreimport error fabric.api










1















I'm setting up a new computer and installed offlineimap with pip install --user offlineimap but when I try to run it I'm getting a series of errors because offlineimap doesn't support Python3:



https://github.com/OfflineIMAP/offlineimap/issues/472



I do have 2.7 installed as well as 3:



amanda@host:~$ python --version
Python 2.7.15rc1


but even I'm not sure how to force offlineimap to use it.



Per https://stackoverflow.com/questions/10919569/install-a-module-using-pip-for-specific-python-version I uninstalled and tried to reinstall, specifying the python version, but that's choking in its own special way:



amanda@host:~$ python2.7 ~/.local/bin/pip install --user offlineimap
Traceback (most recent call last):
File "/home/amanda/.local/bin/pip", line 7, in <module>
from pip._internal import main
ImportError: No module named pip._internal


The full OfflineIMAP error:



OfflineIMAP 7.2.1
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.57 (bundled), Python v3.6.5, OpenSSL 1.1.0g 2 Nov 2017
Account sync Example:
*** Processing account Example
Establishing connection to mail.example.info:993 (VelRemote)
ERROR: While attempting to sync account 'Example'
IMAP4 protocol error: program error: <class 'TypeError'> - cannot use a bytes pattern on a string-like object
*** Finished account 'Example' in 0:00
ERROR: Exceptions occurred during the run!
ERROR: While attempting to sync account 'Example'
IMAP4 protocol error: program error: <class 'TypeError'> - cannot use a bytes pattern on a string-like object

Traceback:
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/accounts.py", line 283, in syncrunner
self.__sync()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/accounts.py", line 359, in __sync
remoterepos.getfolders()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/repository/IMAP.py", line 452, in getfolders
imapobj = self.imapserver.acquireconnection()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/imapserver.py", line 547, in acquireconnection
af=self.af,
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/imaplibutil.py", line 194, in __init__
super(WrappedIMAP4_SSL, self).__init__(*args, **kwargs)
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 2183, in __init__
IMAP4.__init__(self, host, port, debug, debug_file, identifier, timeout, debug_buf_lvl)
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 400, in __init__
self.welcome = self._request_push(name='welcome', tag='continuation').get_response('IMAP4 protocol error: %s')[1]
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 201, in get_response
raise typ(exc_fmt % str(val))









share|improve this question
























  • Please add cat /home/amanda/.local/bin/pip.

    – GAD3R
    Jul 10 '18 at 9:47















1















I'm setting up a new computer and installed offlineimap with pip install --user offlineimap but when I try to run it I'm getting a series of errors because offlineimap doesn't support Python3:



https://github.com/OfflineIMAP/offlineimap/issues/472



I do have 2.7 installed as well as 3:



amanda@host:~$ python --version
Python 2.7.15rc1


but even I'm not sure how to force offlineimap to use it.



Per https://stackoverflow.com/questions/10919569/install-a-module-using-pip-for-specific-python-version I uninstalled and tried to reinstall, specifying the python version, but that's choking in its own special way:



amanda@host:~$ python2.7 ~/.local/bin/pip install --user offlineimap
Traceback (most recent call last):
File "/home/amanda/.local/bin/pip", line 7, in <module>
from pip._internal import main
ImportError: No module named pip._internal


The full OfflineIMAP error:



OfflineIMAP 7.2.1
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.57 (bundled), Python v3.6.5, OpenSSL 1.1.0g 2 Nov 2017
Account sync Example:
*** Processing account Example
Establishing connection to mail.example.info:993 (VelRemote)
ERROR: While attempting to sync account 'Example'
IMAP4 protocol error: program error: <class 'TypeError'> - cannot use a bytes pattern on a string-like object
*** Finished account 'Example' in 0:00
ERROR: Exceptions occurred during the run!
ERROR: While attempting to sync account 'Example'
IMAP4 protocol error: program error: <class 'TypeError'> - cannot use a bytes pattern on a string-like object

Traceback:
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/accounts.py", line 283, in syncrunner
self.__sync()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/accounts.py", line 359, in __sync
remoterepos.getfolders()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/repository/IMAP.py", line 452, in getfolders
imapobj = self.imapserver.acquireconnection()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/imapserver.py", line 547, in acquireconnection
af=self.af,
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/imaplibutil.py", line 194, in __init__
super(WrappedIMAP4_SSL, self).__init__(*args, **kwargs)
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 2183, in __init__
IMAP4.__init__(self, host, port, debug, debug_file, identifier, timeout, debug_buf_lvl)
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 400, in __init__
self.welcome = self._request_push(name='welcome', tag='continuation').get_response('IMAP4 protocol error: %s')[1]
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 201, in get_response
raise typ(exc_fmt % str(val))









share|improve this question
























  • Please add cat /home/amanda/.local/bin/pip.

    – GAD3R
    Jul 10 '18 at 9:47













1












1








1








I'm setting up a new computer and installed offlineimap with pip install --user offlineimap but when I try to run it I'm getting a series of errors because offlineimap doesn't support Python3:



https://github.com/OfflineIMAP/offlineimap/issues/472



I do have 2.7 installed as well as 3:



amanda@host:~$ python --version
Python 2.7.15rc1


but even I'm not sure how to force offlineimap to use it.



Per https://stackoverflow.com/questions/10919569/install-a-module-using-pip-for-specific-python-version I uninstalled and tried to reinstall, specifying the python version, but that's choking in its own special way:



amanda@host:~$ python2.7 ~/.local/bin/pip install --user offlineimap
Traceback (most recent call last):
File "/home/amanda/.local/bin/pip", line 7, in <module>
from pip._internal import main
ImportError: No module named pip._internal


The full OfflineIMAP error:



OfflineIMAP 7.2.1
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.57 (bundled), Python v3.6.5, OpenSSL 1.1.0g 2 Nov 2017
Account sync Example:
*** Processing account Example
Establishing connection to mail.example.info:993 (VelRemote)
ERROR: While attempting to sync account 'Example'
IMAP4 protocol error: program error: <class 'TypeError'> - cannot use a bytes pattern on a string-like object
*** Finished account 'Example' in 0:00
ERROR: Exceptions occurred during the run!
ERROR: While attempting to sync account 'Example'
IMAP4 protocol error: program error: <class 'TypeError'> - cannot use a bytes pattern on a string-like object

Traceback:
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/accounts.py", line 283, in syncrunner
self.__sync()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/accounts.py", line 359, in __sync
remoterepos.getfolders()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/repository/IMAP.py", line 452, in getfolders
imapobj = self.imapserver.acquireconnection()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/imapserver.py", line 547, in acquireconnection
af=self.af,
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/imaplibutil.py", line 194, in __init__
super(WrappedIMAP4_SSL, self).__init__(*args, **kwargs)
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 2183, in __init__
IMAP4.__init__(self, host, port, debug, debug_file, identifier, timeout, debug_buf_lvl)
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 400, in __init__
self.welcome = self._request_push(name='welcome', tag='continuation').get_response('IMAP4 protocol error: %s')[1]
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 201, in get_response
raise typ(exc_fmt % str(val))









share|improve this question
















I'm setting up a new computer and installed offlineimap with pip install --user offlineimap but when I try to run it I'm getting a series of errors because offlineimap doesn't support Python3:



https://github.com/OfflineIMAP/offlineimap/issues/472



I do have 2.7 installed as well as 3:



amanda@host:~$ python --version
Python 2.7.15rc1


but even I'm not sure how to force offlineimap to use it.



Per https://stackoverflow.com/questions/10919569/install-a-module-using-pip-for-specific-python-version I uninstalled and tried to reinstall, specifying the python version, but that's choking in its own special way:



amanda@host:~$ python2.7 ~/.local/bin/pip install --user offlineimap
Traceback (most recent call last):
File "/home/amanda/.local/bin/pip", line 7, in <module>
from pip._internal import main
ImportError: No module named pip._internal


The full OfflineIMAP error:



OfflineIMAP 7.2.1
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.57 (bundled), Python v3.6.5, OpenSSL 1.1.0g 2 Nov 2017
Account sync Example:
*** Processing account Example
Establishing connection to mail.example.info:993 (VelRemote)
ERROR: While attempting to sync account 'Example'
IMAP4 protocol error: program error: <class 'TypeError'> - cannot use a bytes pattern on a string-like object
*** Finished account 'Example' in 0:00
ERROR: Exceptions occurred during the run!
ERROR: While attempting to sync account 'Example'
IMAP4 protocol error: program error: <class 'TypeError'> - cannot use a bytes pattern on a string-like object

Traceback:
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/accounts.py", line 283, in syncrunner
self.__sync()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/accounts.py", line 359, in __sync
remoterepos.getfolders()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/repository/IMAP.py", line 452, in getfolders
imapobj = self.imapserver.acquireconnection()
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/imapserver.py", line 547, in acquireconnection
af=self.af,
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/imaplibutil.py", line 194, in __init__
super(WrappedIMAP4_SSL, self).__init__(*args, **kwargs)
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 2183, in __init__
IMAP4.__init__(self, host, port, debug, debug_file, identifier, timeout, debug_buf_lvl)
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 400, in __init__
self.welcome = self._request_push(name='welcome', tag='continuation').get_response('IMAP4 protocol error: %s')[1]
File "/home/amanda/.local/lib/python3.6/site-packages/offlineimap/bundled_imaplib2.py", line 201, in get_response
raise typ(exc_fmt % str(val))






debian python offlineimap






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago









Rui F Ribeiro

41.8k1483142




41.8k1483142










asked Jul 9 '18 at 18:44









AmandaAmanda

430316




430316












  • Please add cat /home/amanda/.local/bin/pip.

    – GAD3R
    Jul 10 '18 at 9:47

















  • Please add cat /home/amanda/.local/bin/pip.

    – GAD3R
    Jul 10 '18 at 9:47
















Please add cat /home/amanda/.local/bin/pip.

– GAD3R
Jul 10 '18 at 9:47





Please add cat /home/amanda/.local/bin/pip.

– GAD3R
Jul 10 '18 at 9:47










2 Answers
2






active

oldest

votes


















1














The installed Python 3 offlineimap is taking precedence over the installed Python 2.



For deleting the Python 3 version, do:



sudo rm -rf /home/amanda/.local/lib/python3.6/site-packages/offlineimap*


After this, hopefully it should now pickup the Python 2 version.



Known issue



As for your error using pip, is a Debian/Ubuntu known issue.



sudo apt-get install python-pip


or



sudo easy_install pip


should fix it; as the OP also stated, after deleting the Python 3 offlinemap package, the Python 2 version was installed with apt instead of pip with:



sudo apt install offlineimap





share|improve this answer




















  • 1





    I didn't want to screw up the rest of my Python just for this so I tried just installing with sudo apt install offlineimap which worked fine. (I had already removed the offending Py3.6 package)

    – Amanda
    Jul 9 '18 at 19:32











  • @Amanda correcting you pip wont screw up it. Eventually you will have to correct it, if it is not working correctly it will impact you in the short-medium term.

    – Rui F Ribeiro
    Jul 9 '18 at 23:48











  • Question: why would I use rm and not pip uninstall? The latter actually captures a few more files.

    – Amanda
    Jul 10 '18 at 15:04











  • Ideally, pip would install 2.7 packages, while pip3 installs 3.6 packages. But pip isn't broken, it's just assuming I want to default to py3.

    – Amanda
    Jul 10 '18 at 15:06











  • @Amanda The default is python 2. It is "broken" in a sense some configuration change it´s behaviour, and many apps and instructions expect it to handle python 2, as you have found out.

    – Rui F Ribeiro
    Jul 11 '18 at 7:23


















0














Clean up pip*



$ python3 -m pip uninstall pip
$ python -m pip uninstall pip


The ~/.local/bin/pip should be removed.



Reinstall pip locally:



$ curl -LO https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py --user


Install your package:



$ python2.7 ~/.local/bin/pip install --user offlineimap





share|improve this answer























  • This assumed I don't want my default to be python3, though, right?

    – Amanda
    Jul 10 '18 at 15:02











  • @Amanda Just it will reinstall pip.

    – GAD3R
    Jul 10 '18 at 18:49











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f454354%2fhow-do-i-force-offlineimap-to-use-python2-7%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














The installed Python 3 offlineimap is taking precedence over the installed Python 2.



For deleting the Python 3 version, do:



sudo rm -rf /home/amanda/.local/lib/python3.6/site-packages/offlineimap*


After this, hopefully it should now pickup the Python 2 version.



Known issue



As for your error using pip, is a Debian/Ubuntu known issue.



sudo apt-get install python-pip


or



sudo easy_install pip


should fix it; as the OP also stated, after deleting the Python 3 offlinemap package, the Python 2 version was installed with apt instead of pip with:



sudo apt install offlineimap





share|improve this answer




















  • 1





    I didn't want to screw up the rest of my Python just for this so I tried just installing with sudo apt install offlineimap which worked fine. (I had already removed the offending Py3.6 package)

    – Amanda
    Jul 9 '18 at 19:32











  • @Amanda correcting you pip wont screw up it. Eventually you will have to correct it, if it is not working correctly it will impact you in the short-medium term.

    – Rui F Ribeiro
    Jul 9 '18 at 23:48











  • Question: why would I use rm and not pip uninstall? The latter actually captures a few more files.

    – Amanda
    Jul 10 '18 at 15:04











  • Ideally, pip would install 2.7 packages, while pip3 installs 3.6 packages. But pip isn't broken, it's just assuming I want to default to py3.

    – Amanda
    Jul 10 '18 at 15:06











  • @Amanda The default is python 2. It is "broken" in a sense some configuration change it´s behaviour, and many apps and instructions expect it to handle python 2, as you have found out.

    – Rui F Ribeiro
    Jul 11 '18 at 7:23















1














The installed Python 3 offlineimap is taking precedence over the installed Python 2.



For deleting the Python 3 version, do:



sudo rm -rf /home/amanda/.local/lib/python3.6/site-packages/offlineimap*


After this, hopefully it should now pickup the Python 2 version.



Known issue



As for your error using pip, is a Debian/Ubuntu known issue.



sudo apt-get install python-pip


or



sudo easy_install pip


should fix it; as the OP also stated, after deleting the Python 3 offlinemap package, the Python 2 version was installed with apt instead of pip with:



sudo apt install offlineimap





share|improve this answer




















  • 1





    I didn't want to screw up the rest of my Python just for this so I tried just installing with sudo apt install offlineimap which worked fine. (I had already removed the offending Py3.6 package)

    – Amanda
    Jul 9 '18 at 19:32











  • @Amanda correcting you pip wont screw up it. Eventually you will have to correct it, if it is not working correctly it will impact you in the short-medium term.

    – Rui F Ribeiro
    Jul 9 '18 at 23:48











  • Question: why would I use rm and not pip uninstall? The latter actually captures a few more files.

    – Amanda
    Jul 10 '18 at 15:04











  • Ideally, pip would install 2.7 packages, while pip3 installs 3.6 packages. But pip isn't broken, it's just assuming I want to default to py3.

    – Amanda
    Jul 10 '18 at 15:06











  • @Amanda The default is python 2. It is "broken" in a sense some configuration change it´s behaviour, and many apps and instructions expect it to handle python 2, as you have found out.

    – Rui F Ribeiro
    Jul 11 '18 at 7:23













1












1








1







The installed Python 3 offlineimap is taking precedence over the installed Python 2.



For deleting the Python 3 version, do:



sudo rm -rf /home/amanda/.local/lib/python3.6/site-packages/offlineimap*


After this, hopefully it should now pickup the Python 2 version.



Known issue



As for your error using pip, is a Debian/Ubuntu known issue.



sudo apt-get install python-pip


or



sudo easy_install pip


should fix it; as the OP also stated, after deleting the Python 3 offlinemap package, the Python 2 version was installed with apt instead of pip with:



sudo apt install offlineimap





share|improve this answer















The installed Python 3 offlineimap is taking precedence over the installed Python 2.



For deleting the Python 3 version, do:



sudo rm -rf /home/amanda/.local/lib/python3.6/site-packages/offlineimap*


After this, hopefully it should now pickup the Python 2 version.



Known issue



As for your error using pip, is a Debian/Ubuntu known issue.



sudo apt-get install python-pip


or



sudo easy_install pip


should fix it; as the OP also stated, after deleting the Python 3 offlinemap package, the Python 2 version was installed with apt instead of pip with:



sudo apt install offlineimap






share|improve this answer














share|improve this answer



share|improve this answer








edited Jul 10 '18 at 3:03









slm

255k71539687




255k71539687










answered Jul 9 '18 at 18:47









Rui F RibeiroRui F Ribeiro

41.8k1483142




41.8k1483142







  • 1





    I didn't want to screw up the rest of my Python just for this so I tried just installing with sudo apt install offlineimap which worked fine. (I had already removed the offending Py3.6 package)

    – Amanda
    Jul 9 '18 at 19:32











  • @Amanda correcting you pip wont screw up it. Eventually you will have to correct it, if it is not working correctly it will impact you in the short-medium term.

    – Rui F Ribeiro
    Jul 9 '18 at 23:48











  • Question: why would I use rm and not pip uninstall? The latter actually captures a few more files.

    – Amanda
    Jul 10 '18 at 15:04











  • Ideally, pip would install 2.7 packages, while pip3 installs 3.6 packages. But pip isn't broken, it's just assuming I want to default to py3.

    – Amanda
    Jul 10 '18 at 15:06











  • @Amanda The default is python 2. It is "broken" in a sense some configuration change it´s behaviour, and many apps and instructions expect it to handle python 2, as you have found out.

    – Rui F Ribeiro
    Jul 11 '18 at 7:23












  • 1





    I didn't want to screw up the rest of my Python just for this so I tried just installing with sudo apt install offlineimap which worked fine. (I had already removed the offending Py3.6 package)

    – Amanda
    Jul 9 '18 at 19:32











  • @Amanda correcting you pip wont screw up it. Eventually you will have to correct it, if it is not working correctly it will impact you in the short-medium term.

    – Rui F Ribeiro
    Jul 9 '18 at 23:48











  • Question: why would I use rm and not pip uninstall? The latter actually captures a few more files.

    – Amanda
    Jul 10 '18 at 15:04











  • Ideally, pip would install 2.7 packages, while pip3 installs 3.6 packages. But pip isn't broken, it's just assuming I want to default to py3.

    – Amanda
    Jul 10 '18 at 15:06











  • @Amanda The default is python 2. It is "broken" in a sense some configuration change it´s behaviour, and many apps and instructions expect it to handle python 2, as you have found out.

    – Rui F Ribeiro
    Jul 11 '18 at 7:23







1




1





I didn't want to screw up the rest of my Python just for this so I tried just installing with sudo apt install offlineimap which worked fine. (I had already removed the offending Py3.6 package)

– Amanda
Jul 9 '18 at 19:32





I didn't want to screw up the rest of my Python just for this so I tried just installing with sudo apt install offlineimap which worked fine. (I had already removed the offending Py3.6 package)

– Amanda
Jul 9 '18 at 19:32













@Amanda correcting you pip wont screw up it. Eventually you will have to correct it, if it is not working correctly it will impact you in the short-medium term.

– Rui F Ribeiro
Jul 9 '18 at 23:48





@Amanda correcting you pip wont screw up it. Eventually you will have to correct it, if it is not working correctly it will impact you in the short-medium term.

– Rui F Ribeiro
Jul 9 '18 at 23:48













Question: why would I use rm and not pip uninstall? The latter actually captures a few more files.

– Amanda
Jul 10 '18 at 15:04





Question: why would I use rm and not pip uninstall? The latter actually captures a few more files.

– Amanda
Jul 10 '18 at 15:04













Ideally, pip would install 2.7 packages, while pip3 installs 3.6 packages. But pip isn't broken, it's just assuming I want to default to py3.

– Amanda
Jul 10 '18 at 15:06





Ideally, pip would install 2.7 packages, while pip3 installs 3.6 packages. But pip isn't broken, it's just assuming I want to default to py3.

– Amanda
Jul 10 '18 at 15:06













@Amanda The default is python 2. It is "broken" in a sense some configuration change it´s behaviour, and many apps and instructions expect it to handle python 2, as you have found out.

– Rui F Ribeiro
Jul 11 '18 at 7:23





@Amanda The default is python 2. It is "broken" in a sense some configuration change it´s behaviour, and many apps and instructions expect it to handle python 2, as you have found out.

– Rui F Ribeiro
Jul 11 '18 at 7:23













0














Clean up pip*



$ python3 -m pip uninstall pip
$ python -m pip uninstall pip


The ~/.local/bin/pip should be removed.



Reinstall pip locally:



$ curl -LO https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py --user


Install your package:



$ python2.7 ~/.local/bin/pip install --user offlineimap





share|improve this answer























  • This assumed I don't want my default to be python3, though, right?

    – Amanda
    Jul 10 '18 at 15:02











  • @Amanda Just it will reinstall pip.

    – GAD3R
    Jul 10 '18 at 18:49















0














Clean up pip*



$ python3 -m pip uninstall pip
$ python -m pip uninstall pip


The ~/.local/bin/pip should be removed.



Reinstall pip locally:



$ curl -LO https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py --user


Install your package:



$ python2.7 ~/.local/bin/pip install --user offlineimap





share|improve this answer























  • This assumed I don't want my default to be python3, though, right?

    – Amanda
    Jul 10 '18 at 15:02











  • @Amanda Just it will reinstall pip.

    – GAD3R
    Jul 10 '18 at 18:49













0












0








0







Clean up pip*



$ python3 -m pip uninstall pip
$ python -m pip uninstall pip


The ~/.local/bin/pip should be removed.



Reinstall pip locally:



$ curl -LO https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py --user


Install your package:



$ python2.7 ~/.local/bin/pip install --user offlineimap





share|improve this answer













Clean up pip*



$ python3 -m pip uninstall pip
$ python -m pip uninstall pip


The ~/.local/bin/pip should be removed.



Reinstall pip locally:



$ curl -LO https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py --user


Install your package:



$ python2.7 ~/.local/bin/pip install --user offlineimap






share|improve this answer












share|improve this answer



share|improve this answer










answered Jul 10 '18 at 11:03









GAD3RGAD3R

27.7k1858114




27.7k1858114












  • This assumed I don't want my default to be python3, though, right?

    – Amanda
    Jul 10 '18 at 15:02











  • @Amanda Just it will reinstall pip.

    – GAD3R
    Jul 10 '18 at 18:49

















  • This assumed I don't want my default to be python3, though, right?

    – Amanda
    Jul 10 '18 at 15:02











  • @Amanda Just it will reinstall pip.

    – GAD3R
    Jul 10 '18 at 18:49
















This assumed I don't want my default to be python3, though, right?

– Amanda
Jul 10 '18 at 15:02





This assumed I don't want my default to be python3, though, right?

– Amanda
Jul 10 '18 at 15:02













@Amanda Just it will reinstall pip.

– GAD3R
Jul 10 '18 at 18:49





@Amanda Just it will reinstall pip.

– GAD3R
Jul 10 '18 at 18:49

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f454354%2fhow-do-i-force-offlineimap-to-use-python2-7%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.