No matter what I try to do, I cannot get anaconda navigator to run on windows 10 - anaconda

When I try to open anaconda navigator my cmd prompt flashes open with some text and immedietly terminates.
Please help me figure this out... Thanks.
I've tried fresh installs and different directories.
I've tried opening through the shortcut, command prompt, and through the script file.
I've tried all the command prompt commands that I've found on SOF and through github and many help forums. I really cannot figure this out and it's making me want to smash my head through dry wall.
(base) C:\Users\itsat>anaconda-navigator
Traceback (most recent call last):
File "C:\Users\itsat\anaconda3\Scripts\anaconda-navigator-script.py", line 6, in <module>
from anaconda_navigator.app.main import main
File "C:\Users\itsat\anaconda3\lib\site-packages\anaconda_navigator\app\main.py", line 19, in <module>
from anaconda_navigator.app.start import start_app
File "C:\Users\itsat\anaconda3\lib\site-packages\anaconda_navigator\app\start.py", line 27, in <module>
from anaconda_navigator.widgets.main_window import MainWindow
File "C:\Users\itsat\anaconda3\lib\site-packages\anaconda_navigator\widgets\main_window\__init__.py", line 25, in <module>
from anaconda_navigator.api.anaconda_api import AnacondaAPI
File "C:\Users\itsat\anaconda3\lib\site-packages\anaconda_navigator\api\anaconda_api.py", line 30, in <module>
from anaconda_navigator.api.client_api import ClientAPI
File "C:\Users\itsat\anaconda3\lib\site-packages\anaconda_navigator\api\client_api.py", line 23, in <module>
import binstar_client
File "C:\Users\itsat\anaconda3\lib\site-packages\binstar_client\__init__.py", line 21, in <module>
from .mixins.channels import ChannelsMixin
File "C:\Users\itsat\anaconda3\lib\site-packages\binstar_client\mixins\channels.py", line 7, in <module>
from binstar_client.utils import jencode
File "C:\Users\itsat\anaconda3\lib\site-packages\binstar_client\utils\__init__.py", line 14, in <module>
from .config import (get_server_api, dirs, load_token, store_token,
File "C:\Users\itsat\anaconda3\lib\site-packages\binstar_client\utils\config.py", line 90, in <module>
USER_LOGDIR = dirs.user_log_dir
File "C:\Users\itsat\anaconda3\lib\site-packages\binstar_client\utils\appdirs.py", line 253, in user_log_dir
return user_log_dir(self.appname, self.appauthor, version=self.version)
File "C:\Users\itsat\anaconda3\lib\site-packages\binstar_client\utils\appdirs.py", line 192, in user_log_dir
path = user_data_dir(appname, appauthor, version)
File "C:\Users\itsat\anaconda3\lib\site-packages\binstar_client\utils\appdirs.py", line 68, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname)
File "C:\Users\itsat\anaconda3\lib\site-packages\binstar_client\utils\appdirs.py", line 280, in _get_win_folder_with_pywin32
from win32com.shell import shellcon, shell
ImportError: DLL load failed while importing shell: The specified procedure could not be found.
(base) C:\Users\itsat>

pip install pywin32==300 fixed the issues.

Related

JupyterLab in Homebrew-installed Anaconda fails to start kernel, looks for old install

I was hoping someone could help me understand why JupyterLab fails to spin up a kernel on my system.
Background
I'm working on macOS High Sierra. I used to have Anaconda installed via the Mac OS installer in the default location in my home folder ($HOME/anaconda). Based on this thread I uninstalled Anaconda.
I reinstalled Anaconda from the Homebrew Cask (placing export PATH=/usr/local/anaconda3/bin:"$PATH" in my .bashrc).
The Problem
Now when I
run jupyter-lab,
create a new notebook, and
select a Python 3 kernel,
the process fails with the following output:
Traceback (most recent call last):
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/web.py", line 1543, in _execute
result = yield result
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
value = future.result()
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "/usr/local/anaconda3/lib/python3.6/site-packages/notebook/services/sessions/handlers.py", line 73, in post
type=mtype))
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
value = future.result()
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "/usr/local/anaconda3/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
value = future.result()
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "/usr/local/anaconda3/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
value = future.result()
File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 315, in wrapper
yielded = next(result)
File "/usr/local/anaconda3/lib/python3.6/site-packages/notebook/services/kernels/kernelmanager.py", line 148, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyter_client/manager.py", line 259, in start_kernel
**kw)
File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyter_client/manager.py", line 204, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyter_client/launcher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/usr/local/anaconda3/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/local/anaconda3/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '~/anaconda/bin/python': '~/anaconda/bin/python'
I'd already removed all references to $HOME/anaconda (my old install location) from my environment (.bashrc, .bash_profile), so I can't figure out where the reference is being picked up.
Any suggestions would be greatly appreciated.
This question was answered in this GitHub thread for the Jupyter project. The basic solution:
run jupyter kernelspec list to see if it points to the correct Python install
if not, remove the folder ~/Library/Jupyter
re-run jupyter kernelspec list
This should rebuild the directory and give output like
Available kernels:
python3 /usr/local/anaconda3/share/jupyter/kernels/python3
which is the proper location for the Homebrew install of Anaconda.

Julia Kernel Error in Jupyter Notebook (Anaconda)

When I open a Julia 0.6.0 notebook using Jupyter, the kernel tries to connect, fails and the a red button "Kernel Error" appears at the top right of the notebook. I uninstalled and reinstalled, but nothing has changed. The following is the message I got when I click on the "Kernel error":
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\base\handlers.py", line 516, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 75, in post
type=mtype))
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 707, in __init__
restore_signals, start_new_session)
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 990, in _execute_child
startupinfo)
OSError: [WinError 740] The requested operation requires elevation.
Thanks in advance for your help!
It seem like you do not have enough permissions to start the Julia Kernel.
You should not need to be administrator to use the Julia kernel, but it seem like your computer is believing you should.
Try running the julia interpreter, and kernel manually to see if you can.

virtualenv AssertionError on Mac Maverick

The virtualenv broke. I've tried updating, re-installing with pip, setuptools, virtualenv in a bunch of combinations, but nothing works. I've also used brew doctor and still no clue to the problem. Does anyone have this problem and have found a fix? Am I missing a package before installing virtualenv?
Also, if you have similar assertionError, please comment. Maybe we can find a solution together.
Thanks!
$ virtualenv test1
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenv", line 9, in <module>
load_entry_point('virtualenv==1.11', 'console_scripts', 'virtualenv')()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 820, in main
symlink=options.symlink)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 980, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 1176, in install_python
copy_required_modules(home_dir, symlink)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 1114, in copy_required_modules
dst_filename = change_prefix(filename, dst_prefix)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 1079, in change_prefix
(filename, prefixes)
AssertionError: Filename /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so does not start with any of these prefixes: ['/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/Users/user1/Library/Python/2.7/lib/python/site-packages', '/Users/user1/.local/lib/python/2.7/site-packages', '/Library/Frameworks/Python.framework/Versions/2.7', '/Users/user1/Library/Python/2.7/site-packages', '/Library/Python/2.7/site-packages']

iPython Notebook in Windows - Error on Startup

I am trying desperately to get ipython notebook to work in a windows environment. I installed Continuum IO's Anaconda, a scientific distribution of python. I want to use ipython notebook, but get the following error. ipython in the terminal works fine. Any thoughts?
UPDATE: As asked for below, here is the output from sys.path on my system.
['',
'C:\\Anaconda\\scripts',
'C:\\Anaconda\\lib\\site-packages\\distribute-0.6.45-py2.7.egg',
'C:\\Anaconda',
'C:\\Users\\btibert\\ C:\\Anaconda\\Scripts',
'C:\\Anaconda\\python27.zip',
'C:\\Anaconda\\DLLs',
'C:\\Anaconda\\lib',
'C:\\Anaconda\\lib\\plat-win',
'C:\\Anaconda\\lib\\lib-tk',
'C:\\Users\\btibert\\AppData\\Roaming\\Python\\Python27\\site-packages',
'C:\\Users\\btibert\\AppData\\Roaming\\Python\\Python27\\site-packages\\Orange\\orng',
'C:\\Users\\btibert\\AppData\\Roaming\\Python\\Python27\\site-packages\\setuptools-0.6c11-py2.7.egg-info',
'C:\\Anaconda\\lib\\site-packages',
'C:\\Anaconda\\lib\\site-packages\\PIL',
'C:\\Anaconda\\lib\\site-packages\\win32',
'C:\\Anaconda\\lib\\site-packages\\win32\\lib',
'C:\\Anaconda\\lib\\site-packages\\Pythonwin',
'C:\\Users\\btibert\\AppData\\Roaming\\Python\\Python27\\site-packages\\IPython\\extensions']
And here is the error:
C:\Users\btibert>ipython notebook
Traceback (most recent call last):
File "C:\Anaconda\Scripts\ipython-script.py", line 5, in <module>
sys.exit(launch_new_instance())
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\IPython\frontend\terminal\ipapp.py", line 402, in
launch_new_instance
app.initialize()
File "<string>", line 2, in initialize
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\IPython\config\application.py", line 84, in catch
_config_error
return method(app, *args, **kwargs)
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\IPython\frontend\terminal\ipapp.py", line 302, in
initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\IPython\config\application.py", line 84, in catch
_config_error
return method(app, *args, **kwargs)
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\IPython\core\application.py", line 325, in initia
lize
self.parse_command_line(argv)
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\IPython\frontend\terminal\ipapp.py", line 297, in
parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<string>", line 2, in parse_command_line
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\IPython\config\application.py", line 84, in catch
_config_error
return method(app, *args, **kwargs)
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\IPython\config\application.py", line 413, in pars
e_command_line
return self.initialize_subcommand(subc, subargv)
File "<string>", line 2, in initialize_subcommand
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\IPython\config\application.py", line 84, in catch
_config_error
return method(app, *args, **kwargs)
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\IPython\config\application.py", line 349, in init
ialize_subcommand
subapp = import_item(subapp)
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\IPython\utils\importstring.py", line 40, in impor
t_item
module = __import__(package,fromlist=[obj])
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\IPython\frontend\html\notebook\notebookapp.py", l
ine 34, in <module>
from zmq.eventloop import ioloop
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\zmq\eventloop\__init__.py", line 3, in <module>
from zmq.eventloop.ioloop import IOLoop
File "C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\zmq\eventloop\ioloop.py", line 56, in <module>
from zmq.eventloop.platform.auto import set_close_exec, Waker
ImportError: No module named platform.auto
It would be helpful to know what your sys.path is. You can find that by doing:
$ ipython
In [1]: import sys
In [2]: sys.path
And then share here the output. Next, you want to check what files you have in this directory:
C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages\zmq\eventloop\platform
Ideally, you'll see auto.py there, and if C:\Users\btibert\AppData\Roaming\Python\Python27\site-packages is in your sys.path then it is a mystery why it isn't working, but if that file isn't there, the directory doesn't exist, or the path to site-packages isn't in your sys.path, then those need to be resolved first.
Let us know and we can try to take it from there!
I figured out one way to attack this. I didn't really think I would have to get this level, but I completely uninstalled every single possible instance of python I could find. I
unisntalled Anaconda CE
removed every reference to python in PATH
edited my registry to clear out python data (but did leave Python folders)
Removed python from the App/Roaming path outlined above by #IanSR
Basically, I removed every possible reference to python I could find and then re-installed Anaconda CE. Voila, the Anaconda install (appears) to have worked as intended by the distributors.

django-file-picker setup.py broken?

I'm trying to install django file picker, but for whatever reason, it appears that there is a problem with the setup.py. I'm not familiar with how setup works, so it might be something easy to fix, but I can't tell. Stack traces follow.
I'm doing this on windows, in a virtualenv with python 2.7.2.
From inside the unpacked package:
>python ./setup.py install
running install
running bdist_egg
running egg_info
creating django_file_picker.egg-info
writing requirements to django_file_picker.egg-info\requires.txt
writing django_file_picker.egg-info\PKG-INFO
writing top-level names to django_file_picker.egg-info\top_level.txt
writing dependency_links to django_file_picker.egg-info\dependency_links.txt
writing manifest file 'django_file_picker.egg-info\SOURCES.txt'
reading manifest file 'django_file_picker.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
Traceback (most recent call last):
File "./setup.py", line 25, in <module>
zip_safe=False, # because we're including media that Django needs
File "C:\Python27\Lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\Lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\install.py", line 76, in run
self.do_egg_install()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\install.py", line 96, in do_egg_install
self.run_command('bdist_egg')
File "C:\Python27\Lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\bdist_egg.py", line 167, in run
self.run_command("egg_info")
File "C:\Python27\Lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\egg_info.py", line 177, in run
self.find_sources()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\egg_info.py", line 252, in find_sources
mm.run()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\egg_info.py", line 308, in run
self.read_template()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\sdist.py", line 162, in read_template
sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close()
File "C:\Python27\Lib\distutils\text_file.py", line 128, in close
self.file.close ()
AttributeError: 'NoneType' object has no attribute 'close'
From outside the downloaded package:
>pip install ./caktus-django-file-picker-c1d628d
Unpacking c:\users\marcin\documents\oneclickcos\caktus-django-file-picker-c1d628d
Running setup.py egg_info for package from file:///c%7C%5Cusers%5Cmarcin%5Cdocuments%5Coneclickcos%5Ccaktus-django-file-picker-c1d
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "c:\users\marcin\appdata\local\temp\pip-2kgmcr-build\setup.py", line 25, in <module>
zip_safe=False, # because we're including media that Django needs
File "C:\Python27\Lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\Lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "<string>", line 12, in replacement_run
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\egg_info.py", line 252, in find_sources
mm.run()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\egg_info.py", line 308, in run
self.read_template()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\sdist.py", line 162, in read_template
sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close()
File "C:\Python27\Lib\distutils\text_file.py", line 128, in close
self.file.close ()
AttributeError: 'NoneType' object has no attribute 'close'
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info\django_file_picker.egg-info
writing requirements to pip-egg-info\django_file_picker.egg-info\requires.txt
writing pip-egg-info\django_file_picker.egg-info\PKG-INFO
writing top-level names to pip-egg-info\django_file_picker.egg-info\top_level.txt
writing dependency_links to pip-egg-info\django_file_picker.egg-info\dependency_links.txt
writing manifest file 'pip-egg-info\django_file_picker.egg-info\SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info\django_file_picker.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "c:\users\marcin\appdata\local\temp\pip-2kgmcr-build\setup.py", line 25, in <module>
zip_safe=False, # because we're including media that Django needs
File "C:\Python27\Lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\Lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "<string>", line 12, in replacement_run
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\egg_info.py", line 252, in find_sources
mm.run()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\egg_info.py", line 308, in run
self.read_template()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\sdist.py", line 162, in read_template
sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close()
File "C:\Python27\Lib\distutils\text_file.py", line 128, in close
self.file.close ()
AttributeError: 'NoneType' object has no attribute 'close'
----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in C:\Users\Marcin\AppData\Roaming\pip\pip.log
(oneclickcos) C:\Users\Marcin\Documents\oneclickcos>python caktus-django-file-picker-c1d628d\setup.py
Traceback (most recent call last):
File "caktus-django-file-picker-c1d628d\setup.py", line 23, in <module>
long_description=open('README.rst').read(),
IOError: [Errno 2] No such file or directory: 'README.rst'
From pypi:
>pip install django-file-picker
Running setup.py egg_info for package django-file-picker
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "C:\Users\Marcin\Documents\oneclickcos\build\django-file-picker\setup.py", line 25, in <module>
zip_safe=False, # because we're including media that Django needs
File "C:\Python27\Lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\Lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "<string>", line 12, in replacement_run
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\egg_info.py", line 252, in find_sources
mm.run()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\egg_info.py", line 308, in run
self.read_template()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\sdist.py", line 162, in read_template
sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close()
File "C:\Python27\Lib\distutils\text_file.py", line 128, in close
self.file.close ()
AttributeError: 'NoneType' object has no attribute 'close'
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info\django_file_picker.egg-info
writing requirements to pip-egg-info\django_file_picker.egg-info\requires.txt
writing pip-egg-info\django_file_picker.egg-info\PKG-INFO
writing top-level names to pip-egg-info\django_file_picker.egg-info\top_level.txt
writing dependency_links to pip-egg-info\django_file_picker.egg-info\dependency_links.txt
writing manifest file 'pip-egg-info\django_file_picker.egg-info\SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info\django_file_picker.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "C:\Users\Marcin\Documents\oneclickcos\build\django-file-picker\setup.py", line 25, in <module>
zip_safe=False, # because we're including media that Django needs
File "C:\Python27\Lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\Lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\Lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "<string>", line 12, in replacement_run
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\egg_info.py", line 252, in find_sources
mm.run()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\egg_info.py", line 308, in run
self.read_template()
File "C:\Users\Marcin\Documents\oneclickcos\lib\site-packages\setuptools\command\sdist.py", line 162, in read_template
sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close()
File "C:\Python27\Lib\distutils\text_file.py", line 128, in close
self.file.close ()
AttributeError: 'NoneType' object has no attribute 'close'
----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in C:\Users\Marcin\AppData\Roaming\pip\pip.log
I ran into this same error and in my case it was caused by a trailing slash in one of the paths in my MANIFEST.in file.
For some strange reason this crashes distutils. So instead of
recursive-include foo/bar/
use
recursive-include foo/bar
Same for graft, prune, etc.

Resources