ImportError: Module use of python37.dll conflicts with this version of Python.

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
TromboneFreak
Posts: 2
Joined: Sat Oct 19, 2019 6:55 am

ImportError: Module use of python37.dll conflicts with this version of Python.

Post by TromboneFreak »

I have no clue what I'm doing wrong. Mylar used to work for me around.. a year or two ago. I hadn't tried it again till today, and I've run into a few issues. Now, with Python 2.7.9 (64 bit) installed and Windows finding it, I'm getting a dll error. Please help if you can.

EDIT: I suck and didn't post system info.
EDIT 2: FIXED -- See below


- Windows 10 Pro
- Master Build (though Dev had the same result)
- I couldn't find the log file

Here's what the command prompt (admin) showed:
Microsoft Windows [Version 10.0.18362.388]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>python --version
Python 2.7.9

C:\WINDOWS\system32>e:

E:\>cd E:\The Library\Comics\mylar

E:\The Library\Comics\mylar>python mylar.py
Traceback (most recent call last):
File "mylar.py", line 26, in <module>
import mylar
File "E:\The Library\Comics\mylar\mylar\__init__.py", line 27, in <module>
import sqlite3
File "C:\Python27\lib\sqlite3\__init__.py", line 24, in <module>
from dbapi2 import *
File "C:\Python27\lib\sqlite3\dbapi2.py", line 28, in <module>
from _sqlite3 import *
ImportError: Module use of python37.dll conflicts with this version of Python.
Last edited by TromboneFreak on Mon Oct 21, 2019 2:32 am, edited 1 time in total.
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: ImportError: Module use of python37.dll conflicts with this version of Python.

Post by evilhero »

Sounds like you have the python3 in your environment path being called prior to the python2 call.

In some cases, due to having more than one version of python on a system, you might have to use the full path to the python binary instead of just calling python itself (ie. c:\python\python2.7\python27.exe Mylar.py.

If you want to call it without the full python path - then you need to rename python.exe to python27.exe (or something similar), and make sure you have python27.exe in your environment path, so that the binary can be properly called instead of it executing on the python3 binary (ie. python27 Mylar.py would force execution against python2.7)

Also note, that your %pythonpath% (shown below), if specified should not be pointing to your python3 install (I believe blank defaults to the default location based on environment)

Of course, you could also just uninstall python3 if possible, and that should fix the problem as well.

To see what your paths/locations are, from a system terminal cmd prompt:

Code: Select all

echo %PATH%
echo %PYTHONPATH%
python --version
pip --version
pip list
TromboneFreak
Posts: 2
Joined: Sat Oct 19, 2019 6:55 am

Re: ImportError: Module use of python37.dll conflicts with this version of Python.

Post by TromboneFreak »

You. are. my. HERO (no pun intended).

Okay so looking at %path% and %pythonpath% I found another version of Python was installed as a dependency from a separate program. I uninstalled that program, made sure that my current 2.7 path was added, and boom.

Image

Thanks so much!
Post Reply