mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-27 14:25:16 +02:00
Fix clean install of Python 2.7
If using Python 2.7 and don't have numpy installed before hand this error will occur: `NameError: name 'ModuleNotFoundError' is not defined`
This commit is contained in:
parent
1eaab2f669
commit
9cf4b0f339
1 changed files with 5 additions and 0 deletions
5
setup.py
5
setup.py
|
|
@ -40,6 +40,11 @@ import sys
|
||||||
from setuptools import setup, Extension
|
from setuptools import setup, Extension
|
||||||
import codecs
|
import codecs
|
||||||
|
|
||||||
|
try:
|
||||||
|
ModuleNotFoundError
|
||||||
|
except NameError:
|
||||||
|
ModuleNotFoundError = ImportError
|
||||||
|
|
||||||
def read(fname):
|
def read(fname):
|
||||||
with codecs.open(fname, 'r', 'latin') as f:
|
with codecs.open(fname, 'r', 'latin') as f:
|
||||||
return f.read()
|
return f.read()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue