以下错误是什么意思:AttributeError:module“importlib.\u bootstrap\u external”没有属性“\u w\u long”?

2024-09-30 02:16:46 发布

您现在位置:Python中文网/ 问答频道 /正文

最近在windows中通过conda安装了一个github包,该包创建了一个新的Python环境

每当我尝试在新环境中运行Spyder时,都会出现以下错误:

Error processing line 1 of C:\Users\cip18jjp\Anaconda3\envs\ox\lib\site-packages\matplotlib-3.2.1-py3.8-nspkg.pth:

  Traceback (most recent call last):
    File "C:\Users\cip18jjp\Anaconda3\\Lib\site.py", line 168, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
    File "C:\Users\cip18jjp\Anaconda3\Lib\importlib\__init__.py", line 51, in <module>
      _w_long = _bootstrap_external._w_long
  AttributeError: module 'importlib._bootstrap_external' has no attribute '_w_long'

Remainder of file ignored
Python 3.8.2 | packaged by conda-forge | (default, Mar 23 2020, 17:32:17) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

osmnx和github页面上给出的命令:conda config --prepend channels conda-forge conda create -n ox --strict-channel-priority osmnx

已解决:windows中的Path变量指向一些不同的Python文件位置


Tags: ofingithubwindowsliblinesiteconda

热门问题