How to use anaconda packages for python 3.7 on windows 10?

吃可爱长大的小学妹 提交于 2020-01-04 15:28:48

问题


Im on windows 10 Pro 64 bit version.

I download Anaconda3-2019.03-Windows-x86_64.exe from this page: https://www.anaconda.com/distribution/

I double click the exe and follow the steps - I install it system wide at C:\ProgramData\Anaconda3.

I launch the anaconda prompt. I create a virtualenv with conda create --name pythone37 python=3.7. I do conda install numpy (for instance)

Then I get :

Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
C:\Users\Alex Marshall\AppData\Roaming\Python\Python37\site-packages\numpy\.libs\libopenblas.JKAMQ5EVHIVCPXP2XZJB2RQPIN47S32M.gfortran-win32.dll
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Alex Marshall\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 142, in <module>
    from . import core
  File "C:\Users\Alex Marshall\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py", line 24, in <module>
    WinDLL(os.path.abspath(filename))
  File "C:\Users\Alex Marshall\.conda\envs\python37\lib\ctypes\__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application

It seems to happen with any package that calls external C libraries (I think thats why its using WinDLL?). Also happens with numba for instance.

It does not happen with python3.6 or 32bit python. What gives? Is this just broken on windows for 3.7 64bit?

来源:https://stackoverflow.com/questions/56349657/how-to-use-anaconda-packages-for-python-3-7-on-windows-10

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!