0

Recently installed a github package through conda in windows that has created a new Python environment.

Whenever I try to run Spyder in the new environment I get the following error:

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 and the command as given on the github page: conda config --prepend channels conda-forge conda create -n ox --strict-channel-priority osmnx

Solved: Path variable in windows pointed to some different Python file locations.

JJP
  • 3
  • 1
  • 5

1 Answers1

2

This is because python and pip are installed on different sources. For more info, please look at the following post

using pip3: module "importlib._bootstrap" has no attribute "SourceFileLoader"

Sai Prashanth
  • 144
  • 2
  • 11