python=3.5.2时,安装Django是2.0.7版本时,出问题的解决方案

前提是:

       在使用TensorFlow框架时,我用的python是3.5.2版本的。

       因为现在需要用到Django这个框架,做局域网连接。发现,当我使用2.0以上版本时,会自动安装python是3.6的版本。这个很让我吐血。。。

       后来,我为了偷懒,就将"Anaconda"这个下的 Tensorflow中python的版本进行了升级,升级成了3.6版本。

      当我运行以前写的程序时,就发现了各种各样的错误。例如下面就是:

           mportError: Importing the multiarray numpy extension module failed.

          Most likely you are trying to import a failed build of numpy.

          If you're working with a numpy git repo, try `git clean -xdf` (removes all files not under version control).

         Otherwise reinstall numpy. Original error was: cannot import name multiarray

   从网上找了些资料,说是多版本的原因。

   我将python3.5.2的numpy卸载,重新装到3.6中,结果还是有问题。

最后:

      将python的版本恢复到了3.5.2中,重新装了下新版本的2.0.7就可以了。

     如果再不行,那就重启下电脑在安装。

猜你喜欢

转载自blog.csdn.net/qq_32716885/article/details/81200144