The screen only shows for about few seconds then disappear without launching anything, Here's what appears on the screen:
Jupyter Notebook (gI-env)
Traceback (most recent call last):
File “C:/Users/user/Anaconda2/envs/gl-env/Scripts/jupyter-notebook-script.py”, line 3, in <module>
import notebook. notebookapp
File “C:\Users\user\Anaconda2\envs\gl-env\lib\site-packages\notebook\notebookapp.py”, line 32, in <module>
from zmq.eventloop import ioloop
File “C:\Python27\Lib\site-packages\zmq\_init_.py’, line 29, in <module>
_load_libzmq()
File “C:\Python27\Lib\site-packages\zmq\_init_.py”, line 21, in _load_libzmq
if platform.python_implementationQ.lower() == ‘pypy’:
File “C:\Python27\Lib\platform.py”, line 1458, in python_implementation
return _sys_versionQ[ø]
File “C:\Python27\Lib\platform.py”, line 1420, in _sys_version
repr(sys_version))
ValueError: failed to parse CPython sys.version: ‘2.7.11 lAnaconda 4.0.0 (64-bit)I (default, Feb 16 2016g 09:58:36) [fISC
v.1500 64 bit (AMD64)]’
What is the error that I'm facing here?
Related
I'm trying to setup a Django project but Im getting this:
python2.7 manage.py migrate
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 338, in execute
django.setup()
File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 94, in create
module = import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named reversion
So I'm trying to instal reversion, but I'm getting this error message when trying to installenter code here it:
$sudo pip install django-reversion
Downloading/unpacking django-reversion
Downloading django-reversion-3.0.7.tar.gz (67kB): 67kB downloaded
Running setup.py (path:/tmp/pip_build_root/django-reversion/setup.py) egg_info for package django-reversion
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/django-reversion/setup.py", line 28, in <module>
long_description=read('README.rst'),
File "/tmp/pip_build_root/django-reversion/setup.py", line 19, in read
with open(filepath, "r", encoding="utf-8") as f:
TypeError: 'encoding' is an invalid keyword argument for this function
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/django-reversion/setup.py", line 28, in <module>
long_description=read('README.rst'),
File "/tmp/pip_build_root/django-reversion/setup.py", line 19, in read
with open(filepath, "r", encoding="utf-8") as f:
TypeError: 'encoding' is an invalid keyword argument for this function
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/django-reversion
Storing debug log for failure in /home/tirengarfio/.pip/pip.log
I'm on Ubuntu 16.04 and python 2.7.
That Python3-only open() was added with version 3.0.6. Try earlier versions, 3.0.5 or 3.0.4:
pip install django-reversion==3.0.5
or
pip install django-reversion==3.0.4
Django 3 supports python versions 3.6 and above.
Here is the official Django 3.0 release notes
everyone!
I'm trying to install and run tensorflow (GPU-support). I followed the guide and installed cudnn 7 and cuda 9.0.
However, when trying to import tensorflow, I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/boudi/anaconda2/lib/python2.7/site-
packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint:
disable=unused-import
File "/home/boudi/anaconda2/lib/python2.7/site-
packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/boudi/anaconda2/lib/python2.7/site-
packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/boudi/anaconda2/lib/python2.7/site-
packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/boudi/anaconda2/lib/python2.7/site-
packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
<module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/boudi/anaconda2/lib/python2.7/site-
packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in
swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname,
description)
ImportError: /home/boudi/anaconda2/lib/python2.7/site-
packages/tensorflow/python/../libtensorflow_framework.so: undefined
symbol: cuDevicePrimaryCtxGetState
How can I fix it?
I had the same problem - I had already installed the required NVIDIA drivers on my Ubuntu machine, but when I tried to import Tensorflow I got the same error.
So for me the problem was that I was using the Nouveau driver instead of the NVIDIA driver. In order to fix the issue you need to go to System Settings->Software & Updates->Additional Drivers and select the option Using NVIDIA binary driver ... and then click at the Apply Changes button. Then just reboot and you're done.
I am trying to install QSTK on my python 2.7.3. (on windows 10). During the installation, it seemed there was no problem and I did not face any errors. However, when I run the validation.py (here) to check it seems that QSTK.qstkstudu cannot be imported. Here is the error that I get while running validation.py:
QSTK is installed and can be imported
[...]
QSTK.qstkutil is installed and can be imported
File "C:\Python27\lib\site.py", line 372, in __call__
raise SystemExit(code)
SystemExit: Error : QSTK.qstkstudy can not be imported.
Does anyone have a clue what should I do?
The line in Validation.py which produces the error is:
import QSTK.qstkstudy.EventProfiler
If you try it directly in python, you can see what is missing. In my case it was tkinter.
>>> import QSTK.qstkstudy.EventProfiler
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/QSTK-0.2.8-py2.7.egg/QSTK/qstkstudy/EventProfiler.py", line 16, in <module>
import matplotlib.pyplot as plt
File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 114, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/usr/lib/python2.7/dist-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
globals(),locals(),[backend_name],0)
File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_tkagg.py", line 6, in <module>
from matplotlib.externals.six.moves import tkinter as Tk
File "/usr/lib/python2.7/dist-packages/matplotlib/externals/six.py", line 199, in load_module
mod = mod._resolve()
File "/usr/lib/python2.7/dist-packages/matplotlib/externals/six.py", line 113, in _resolve
return _import_module(self.mod)
File "/usr/lib/python2.7/dist-packages/matplotlib/externals/six.py", line 80, in _import_module
__import__(name)
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in <module>
raise ImportError, str(msg) + ', please install the python-tk package'
ImportError: No module named _tkinter, please install the python-tk package
I am on Linux so I did
sudo apt-get python-tk
Google how to install python tkinter in Windows.
Good luck
I am trying to run a python 2.7 script which uses parallel python (version 1.6.1) to excute a function which uses numpy arrays (numpy version 1.6.1) on a Ubuntu Voyager (Ubuntu 12.04 derivative) system. It gives me the following error message (actually, it's still longer, repeated 12 times I guess):
Starting pp with 12 workers
* An error has occured during the module import
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/ppworker.py", line 49, in preprocess
exec module
File "<string>", line 1, in <module>
File "/usr/share/pyshared/numpy/__init__.py", line 137, in <module>
import add_newdocs
File "/usr/share/pyshared/numpy/add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "/usr/share/pyshared/numpy/lib/__init__.py", line 4, in <module>
from type_check import *
File "/usr/share/pyshared/numpy/lib/type_check.py", line 8, in <module>
import numpy.core.numeric as _nx
File "/usr/share/pyshared/numpy/core/__init__.py", line 5, in <module>
import multiarray
ImportError: No module named multiarray
A fatal error has occured during the function execution
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/ppworker.py", line 86, in run
__args = pickle.loads(__sargs)
File "/usr/share/pyshared/numpy/__init__.py", line 137, in <module>
import add_newdocs
File "/usr/share/pyshared/numpy/add_newdocs.py", line 9, in <module>
from numpy.lib import add_newdoc
File "/usr/share/pyshared/numpy/lib/__init__.py", line 4, in <module>
from type_check import *
File "/usr/share/pyshared/numpy/lib/type_check.py", line 8, in <module>
import numpy.core.numeric as _nx
File "/usr/share/pyshared/numpy/core/__init__.py", line 5, in <module>
import multiarray
ImportError: No module named multiarray
Exception in thread run_local:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 504, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/pymodules/python2.7/pp.py", line 719, in _run_local
job.finalize(sresult)
UnboundLocalError: local variable 'sresult' referenced before assignment
Exception in thread run_local:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 504, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/pymodules/python2.7/pp.py", line 719, in _run_local
job.finalize(sresult)
UnboundLocalError: local variable 'sresult' referenced before assignment
From other threads (e.g. importing NumPy in Parallel Python) I have seen that it's probably an issue with the communication of pp and numpy, so I have tried these:
updating pp and numpy
reinstalling numpy (I'm using the anaconda package)
running the code directly from the shell (not from spyder)
submitting multiarray (which otherwise imports just fine) directly to the workers with the job (and I'm sure I have the correct syntax ...)
but to no avail. Do you have any other suggestions? Is there a simple workaround other than, erm, "de-numpying" my function (which would be sad, it's a matrix multiplication)? My colleague who uses a more recent version of the same operating system, but otherwise the same python setup, does not seem to have this problem, but since time is an issue updating my system or hijacking his slower computer are both not the best options.
If necessary, feel free to ask for more details & thank you in advance.
I have installed and probably right configurated apache2, mod_wsgi and python 2.7.5. The problem is that 127.0.0.1 is not opening (loading is just freezed) and I see following log in error.log:
[Wed Jun 19 14:49:11 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.4 Python/2.7.3 configured -- resuming normal operations
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site.py", line 548, in <module>
main()
File "/usr/local/lib/python2.7/site.py", line 530, in main
known_paths = addusersitepackages(known_paths)
File "/usr/local/lib/python2.7/site.py", line 266, in addusersitepackages
user_site = getusersitepackages()
File "/usr/local/lib/python2.7/site.py", line 241, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/local/lib/python2.7/site.py", line 231, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/local/lib/python2.7/sysconfig.py", line 516, in get_config_var
return get_config_vars().get(name)
File "/usr/local/lib/python2.7/sysconfig.py", line 449, in get_config_vars
import re
File "/usr/local/lib/python2.7/re.py", line 105, in <module>
import sre_compile
File "/usr/local/lib/python2.7/sre_compile.py", line 14, in <module>
import sre_parse
File "/usr/local/lib/python2.7/sre_parse.py", line 17, in <module>
from sre_constants import *
File "/usr/local/lib/python2.7/sre_constants.py", line 18, in <module>
from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
Tried to restart apache, but it's not working. Thanks for any help!
Just found solution. I checked 'sys.prefix' in my python's interpretator and it printed '/usr/local', but I had not set WSGIPythonHome in apache config (as written in mod_wsgi docs for this case). And just for experiment I set 'WSGIPythonHome /usr'. It's strange, but it resolves my problem, everything is fine now!