Best way to get rid import error in `vim-latexsuite`
I'm running Arch Linux and I have the vim-latexsuite
package installed. A while ago I noticed started getting an error whenever I opened a .tex
file:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/share/vim/vimfiles/ftplugin/latex-suite/bibtools.py", line 11, in <module>
from urllib import urlopen, pathname2url
ImportError: cannot import name 'urlopen' from 'urllib' (/home/tomas/miniconda3/lib/python3.7/urllib/__init__.py)
So basically this error is coming up (I think) because vim-latexsuite
is using python 3, but it's trying to import a module that only exists in Python 2.
However, when I modify its code to use the Python 3 version I get this error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/share/vim/vimfiles/ftplugin/latex-suite/bibtools.py", line 11, in <module>
from urllib.request import urlopen, pathname2url
File "/home/me/miniconda3/lib/python3.7/urllib/request.py", line 84, in <module>
import base64
File "/home/me/miniconda3/lib/python3.7/base64.py", line 10, in <module>
import struct
File "/home/me/miniconda3/lib/python3.7/struct.py", line 13, in <module>
from _struct import *
Which seems like it's related to my miniconda install, but I can't pinpoint the problem. If I open Python 3 and try from urllib.request import urlopen, pathname2url
, it works fine, so it's hard for me to debug it.
Any ideas of how to solve this?
arch-linux vim python plugin
add a comment |
I'm running Arch Linux and I have the vim-latexsuite
package installed. A while ago I noticed started getting an error whenever I opened a .tex
file:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/share/vim/vimfiles/ftplugin/latex-suite/bibtools.py", line 11, in <module>
from urllib import urlopen, pathname2url
ImportError: cannot import name 'urlopen' from 'urllib' (/home/tomas/miniconda3/lib/python3.7/urllib/__init__.py)
So basically this error is coming up (I think) because vim-latexsuite
is using python 3, but it's trying to import a module that only exists in Python 2.
However, when I modify its code to use the Python 3 version I get this error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/share/vim/vimfiles/ftplugin/latex-suite/bibtools.py", line 11, in <module>
from urllib.request import urlopen, pathname2url
File "/home/me/miniconda3/lib/python3.7/urllib/request.py", line 84, in <module>
import base64
File "/home/me/miniconda3/lib/python3.7/base64.py", line 10, in <module>
import struct
File "/home/me/miniconda3/lib/python3.7/struct.py", line 13, in <module>
from _struct import *
Which seems like it's related to my miniconda install, but I can't pinpoint the problem. If I open Python 3 and try from urllib.request import urlopen, pathname2url
, it works fine, so it's hard for me to debug it.
Any ideas of how to solve this?
arch-linux vim python plugin
add a comment |
I'm running Arch Linux and I have the vim-latexsuite
package installed. A while ago I noticed started getting an error whenever I opened a .tex
file:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/share/vim/vimfiles/ftplugin/latex-suite/bibtools.py", line 11, in <module>
from urllib import urlopen, pathname2url
ImportError: cannot import name 'urlopen' from 'urllib' (/home/tomas/miniconda3/lib/python3.7/urllib/__init__.py)
So basically this error is coming up (I think) because vim-latexsuite
is using python 3, but it's trying to import a module that only exists in Python 2.
However, when I modify its code to use the Python 3 version I get this error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/share/vim/vimfiles/ftplugin/latex-suite/bibtools.py", line 11, in <module>
from urllib.request import urlopen, pathname2url
File "/home/me/miniconda3/lib/python3.7/urllib/request.py", line 84, in <module>
import base64
File "/home/me/miniconda3/lib/python3.7/base64.py", line 10, in <module>
import struct
File "/home/me/miniconda3/lib/python3.7/struct.py", line 13, in <module>
from _struct import *
Which seems like it's related to my miniconda install, but I can't pinpoint the problem. If I open Python 3 and try from urllib.request import urlopen, pathname2url
, it works fine, so it's hard for me to debug it.
Any ideas of how to solve this?
arch-linux vim python plugin
I'm running Arch Linux and I have the vim-latexsuite
package installed. A while ago I noticed started getting an error whenever I opened a .tex
file:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/share/vim/vimfiles/ftplugin/latex-suite/bibtools.py", line 11, in <module>
from urllib import urlopen, pathname2url
ImportError: cannot import name 'urlopen' from 'urllib' (/home/tomas/miniconda3/lib/python3.7/urllib/__init__.py)
So basically this error is coming up (I think) because vim-latexsuite
is using python 3, but it's trying to import a module that only exists in Python 2.
However, when I modify its code to use the Python 3 version I get this error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/share/vim/vimfiles/ftplugin/latex-suite/bibtools.py", line 11, in <module>
from urllib.request import urlopen, pathname2url
File "/home/me/miniconda3/lib/python3.7/urllib/request.py", line 84, in <module>
import base64
File "/home/me/miniconda3/lib/python3.7/base64.py", line 10, in <module>
import struct
File "/home/me/miniconda3/lib/python3.7/struct.py", line 13, in <module>
from _struct import *
Which seems like it's related to my miniconda install, but I can't pinpoint the problem. If I open Python 3 and try from urllib.request import urlopen, pathname2url
, it works fine, so it's hard for me to debug it.
Any ideas of how to solve this?
arch-linux vim python plugin
arch-linux vim python plugin
edited Feb 15 at 20:08
TomCho
asked Feb 15 at 19:57
TomChoTomCho
208320
208320
add a comment |
add a comment |
0
active
oldest
votes
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f500940%2fbest-way-to-get-rid-import-error-in-vim-latexsuite%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f500940%2fbest-way-to-get-rid-import-error-in-vim-latexsuite%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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