关于anaconda及pytorch问题集锦

1、关于torch的问题
在这里插入图片描述
对应着pycharm中这样配置interpreter:
在这里插入图片描述
可以看到如下问题:
在这里插入图片描述
想着 应该是interpreter的配置问题,更改pycharm的interpreter配置

更改配置后:
在这里插入图片描述
显示是没有问题的,但是运行的时候却出现如下错误:

Traceback (most recent call last):
  File "E:\inner_install\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\numpy\core\__init__.py", line 24, in <module>
    from . import multiarray
  File "E:\inner_install\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\numpy\core\multiarray.py", line 14, in <module>
    from . import overrides
  File "E:\inner_install\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\numpy\core\overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: DLL load failed: 找不到指定的模块。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/Administrator/PycharmProjects/SE_DNN/DNN.py", line 6, in <module>
    import matplotlib.pyplot as plt
  File "E:\inner_install\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\matplotlib\__init__.py", line 139, in <module>
    from . import cbook, rcsetup
  File "E:\inner_install\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\matplotlib\cbook\__init__.py", line 32, in <module>
    import numpy as np
  File "E:\inner_install\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\numpy\__init__.py", line 142, in <module>
    from . import core
  File "E:\inner_install\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\numpy\core\__init__.py", line 54, in <module>
    raise ImportError(msg)
ImportError: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.6 from "E:\inner_install\ProgramData\Anaconda3\envs\pytorch\python.exe",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.18.1" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

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

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: DLL load failed: 找不到指定的模块。


Process finished with exit code 1
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值