Installing dPCA under Python 3.6
ThomasAkam opened this issue · comments
I just installed the dPCA python package under Python 3.6 (Anaconda Python distribution). It took quite a bit of time to work out how so I though I would share how I got it to work in case other people have the same problems.
Trying to install using PIP I got an error ValueError: 'dPCA/nan_shuffle.pyx' doesn't match any files
Trying to install using python setup.py install
I got an error: error: Unable to find vcvarsall.bat
This was due to Cython not being able to find a C++ compiler. Following instructions here it created a file Anaconda\Lib\distutils\distutils.cfg
containing:
[build]
compiler=mingw32
[build_ext]
compiler = mingw32
However I still could not install with either PIP or setup.py, getting an error:
File "C:\Users\takam\Anaconda3\lib\distutils\cygwinccompiler.py", line 126, in
__init__
if self.ld_version >= "2.10.90":
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
Using the Microsoft Visual Studio 2015 build tools as the compiler rather than mingw32 fixed this problem. I downloaded and installed the tools from here and edited the file Anaconda\Lib\distutils\distutils.cfg
to read:
[build]
compiler=msvc
[build_ext]
compiler = msvc
I could then install dPCA from the setup.py file with: python setup.py install
This should be fixed with the latest version. Please install via pip.