1

Installation failed on Windows 10 machine for Python 3.8.3

pip install PyQt-Fit
ERROR: Command errored out with exit status 1:
command: 'c:\users\mkz\appdata\local\programs\python\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\mkz\AppData\Local\Temp\pip-install-rn6exgn0\distribute\setup.py'"'"'; file='"'"'C:\Users\mkz\AppData\Local\Temp\pip-install-rn6exgn0\distribute\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\mkz\AppData\Local\Temp\pip-pip-egg-info-6yfk5kue'
cwd: C:\Users\mkz\AppData\Local\Temp\pip-install-rn6exgn0\distribute
Complete output (15 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\mkz\AppData\Local\Temp\pip-install-rn6exgn0\distribute\setuptools_init_.py", line 2, in
from setuptools.extension import Extension, Library
File "C:\Users\mkz\AppData\Local\Temp\pip-install-rn6exgn0\distribute\setuptools\extension.py", line 5, in
from setuptools.dist import get_unpatched
File "C:\Users\mkz\AppData\Local\Temp\pip-install-rn6exgn0\distribute\setuptools\dist.py", line 7, in
from setuptools.command.install import install
File "C:\Users\mkz\AppData\Local\Temp\pip-install-rn6exgn0\distribute\setuptools\command_init.py", line 8, in
from setuptools.command import install_scripts
File "C:\Users\mkz\AppData\Local\Temp\pip-install-rn6exgn0\distribute\setuptools\command\install_scripts.py", line 3, in
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "C:\Users\mkz\AppData\Local\Temp\pip-install-rn6exgn0\distribute\pkg_resources.py", line 1518, in
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Roshin Raphel
  • 2,612
  • 4
  • 22
  • 40
murtaza erti
  • 37
  • 1
  • 4

1 Answers1

1

After spending a few hours, I realized that maybe PyQt-Fit only works with python 2.7 then I created a conda environment with python 2.7 and created a kernel

//This is for conda to support switching kernels
conda install nb_conda

conda create -n py27 python=2.7
conda activate py27

//install PyQt-Fit
pip install -I path.py==7.7.1
pip install git+https://github.com/Multiplicom/pyqt-fit.git

// This is needed for Jupyter Notebook connecting with new kernel
pip install pypiwin32

//Make sure you are at the same directory as the py27 env, for example, C:\Anaconda3\envs\py27
//Create a new kernel
conda install notebook ipykernel
ipython kernelspec install-self

//now run jupyter notebook

A few useful links that helped me to get things fixed.

https://docs.continuum.io/anaconda/user-guide/tasks/use-jupyter-notebook-extensions/

https://github.com/ipython/ipykernel/issues/52

In which conda environment is Jupyter executing?

PyQt_Fit: cannot import name path

Babak Ravandi
  • 538
  • 5
  • 13