Anaconda Spyder fails to start because of Jedi problems - anaconda

File
"/home/srikanth/anaconda3/envs/keras/lib/python3.5/site-packages/spyder/utils/introspection/manager.py",
line 220, in get_completions
info = self._get_code_info('completions', automatic=automatic) File
"/home/srikanth/anaconda3/envs/keras/lib/python3.5/site-packages/spyder/utils/introspection/manager.py",
line 216, in _get_code_info
**kwargs) File "/home/srikanth/anaconda3/envs/keras/lib/python3.5/site-packages/spyder/utils/introspection/utils.py",
line 75, in init
self._get_info() File "/home/srikanth/anaconda3/envs/keras/lib/python3.5/site-packages/spyder/utils/introspection/utils.py",
line 87, in _get_info
lexer = find_lexer_for_filename(self.filename) File "/home/srikanth/anaconda3/envs/keras/lib/python3.5/site-packages/spyder/utils/introspection/utils.py",
line 180, in find_lexer_for_filename
lexer = get_lexer_for_filename(filename) File "/home/srikanth/anaconda3/envs/keras/lib/python3.5/site-packages/pygments/lexers/init.py",
line 203, in get_lexer_for_filename
res = find_lexer_class_for_filename(_fn, code) File "/home/srikanth/anaconda3/envs/keras/lib/python3.5/site-packages/pygments/lexers/init.py",
line 168, in find_lexer_class_for_filename
for cls in find_plugin_lexers(): File "/home/srikanth/anaconda3/envs/keras/lib/python3.5/site-packages/pygments/plugin.py",
line 53, in find_plugin_lexers
yield entrypoint.load() File "/home/srikanth/anaconda3/envs/keras/lib/python3.5/site-packages/pkg_resources/init.py",
line 2404, in load
self.require(*args, **kwargs) File "/home/srikanth/anaconda3/envs/keras/lib/python3.5/site-packages/pkg_resources/init.py",
line 2427, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras) File
"/home/srikanth/anaconda3/envs/keras/lib/python3.5/site-packages/pkg_resources/init.py",
line 872, in resolve
raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (parso 0.1.1
(/home/srikanth/anaconda3/envs/keras/lib/python3.5/site-packages),
Requirement.parse('parso==0.1.0'), {'jedi'})
Please help me regarding this.

Please run in a system terminal (cmd.exe)
conda update jedi
to fix this. If that fails, then please run
conda install parso=0.1.0

Related

GhostscriptError: -100 while using camelot-py

Windows 10, Python 3.7.4, Ghostscript 9.5.2
After having this problem I've installed camelot from the repository. Havn't got this error again, but got this new one:
File "data_extract2.py", line 17, in get_data_tables
return camelot.read_pdf(daily_url, pages="all")
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\io.py", line 117, in read_pdf
**kwargs
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\handlers.py", line 172, in parse
p, suppress_stdout=suppress_stdout, layout_kwargs=layout_kwargs
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\parsers\lattice.py", line 403, in extract_tables
self.generate_image()
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\parsers\lattice.py", line 220, in generate_image
with Ghostscript(*gs_call, stdout=null) as gs:
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\ext\ghostscript_init.py", line 95, in Ghostscript
stderr=kwargs.get("stderr", None),
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\ext\ghostscript_init.py", line 39, in init
rc = gs.init_with_args(instance, args)
File "C:\Users\AppData\Local\Programs\Python\Python37-32\lib\site-packages\camelot\ext\ghostscript_gsprint.py", line 173, in init_with_args
raise GhostscriptError(rc)
camelot.ext.ghostscript._gsprint.GhostscriptError: -100
Any idea how to solve it?

Trouble in Installing through pip3

I am trying to install packages through pip3
pip3 install keras
But, the error is as follows:
Collecting keras
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python3/dist-packages/pip/index.py", line 792, in get_page
"Cache-Control": "max-age=600",
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3/dist-packages/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/adapters.py", line 405, in send
conn = self.get_connection(request.url, proxies)
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/adapters.py", line 303, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/adapters.py", line 197, in proxy_manager_for
**proxy_kwargs)
File "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/poolmanager.py", line 440, in proxy_from_url
return ProxyManager(proxy_url=url, **kw)
File "/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/poolmanager.py", line 391, in __init__
raise ProxySchemeUnknown(proxy.scheme)
urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme
My institute needs a proxy and I updated proxy at all places in my system using ProxyMan.
Is it due to proxy? Because I had fresh install of Linux. If because of proxy, where do i need to update proxy?
I had a similar issue and I solved it by adding my proxy settings at the end of /etc/bash.bashrc like this:
export http_proxy="http://<user>:<pass>#<proxy>:<port>
export https_proxy="https://<user>:<pass>#<proxy>:<port>
export ftp_proxy="ftp://<user>:<pass>#<proxy>:<port>
export socks_proxy="socks://<user>:<pass>#<proxy>:<port>
You can try to use easy_install + packagename instead of pip.

Celery not starting in OS X - dbm.error: db type is dbm.gnu, but the module is not available

I'm trying to run celery worker in OS X (Mavericks). I activated virtual environment (python 3.4) and tried to start Celery with this argument:
celery worker --app=scheduling -linfo
Where scheduling is my celery app.
But I ended up with this error: dbm.error: db type is dbm.gnu, but the module is not available
Complete stacktrace:
Traceback (most recent call last):
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/kombu/utils/__init__.py", line 320, in __get__
return obj.__dict__[self.__name__]
KeyError: 'db'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/other/PhoenixEnv/bin/celery", line 9, in <module>
load_entry_point('celery==3.1.9', 'console_scripts', 'celery')()
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/__main__.py", line 30, in main
main()
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/celery.py", line 80, in main
cmd.execute_from_commandline(argv)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/celery.py", line 768, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/base.py", line 308, in execute_from_commandline
return self.handle_argv(self.prog_name, argv[1:])
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/celery.py", line 760, in handle_argv
return self.execute(command, argv)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/celery.py", line 692, in execute
).run_from_argv(self.prog_name, argv[1:], command=argv[0])
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/worker.py", line 175, in run_from_argv
return self(*args, **options)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/base.py", line 271, in __call__
ret = self.run(*args, **kwargs)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bin/worker.py", line 209, in run
).start()
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/__init__.py", line 100, in __init__
self.setup_instance(**self.prepare_args(**kwargs))
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/__init__.py", line 141, in setup_instance
self.blueprint.apply(self, **kwargs)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bootsteps.py", line 221, in apply
step.include(parent)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bootsteps.py", line 347, in include
return self._should_include(parent)[0]
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/bootsteps.py", line 343, in _should_include
return True, self.create(parent)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/components.py", line 220, in create
w._persistence = w.state.Persistent(w.state, w.state_db, w.app.clock)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/state.py", line 161, in __init__
self.merge()
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/state.py", line 169, in merge
self._merge_with(self.db)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/kombu/utils/__init__.py", line 322, in __get__
value = obj.__dict__[self.__name__] = self.__get(obj)
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/state.py", line 238, in db
return self.open()
File "/Users/other/PhoenixEnv/lib/python3.4/site-packages/celery/worker/state.py", line 165, in open
self.filename, protocol=self.protocol, writeback=True,
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/shelve.py", line 223, in __init__
Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/dbm/__init__.py", line 91, in open
"available".format(result))
dbm.error: db type is dbm.gnu, but the module is not available
Please help.
I switched to python3.5 and got the same error. On Ubuntu I could fix it with
aptitude install python3.5-gdbm
I got the same error. On Macbook I could fix it with
brew install gdb

ipython notebook installation on mac os x

I am wondering if anyone has installed ipython notebook on mac OSX?
Currently I am able to run it in the terminal note but as soon as I type in the notebook version, there are problems encountered in running it.
Below is the error I have gotten:
Traceback (most recent call last): File
"/Users/tayyangki/anaconda/bin/ipython", line 9, in
load_entry_point('ipython==2.0.0-dev', 'console_scripts', 'ipython')() File
"/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/init.py",
line 118, in start_ipython
return launch_new_instance(argv=argv, **kwargs) File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/application.py",
line 565, in launch_instance
app.initialize(argv) File "", line 2, in initialize File
"/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/application.py",
line 92, in catch_config_error
return method(app, *args, **kwargs) File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/terminal/ipapp.py",
line 314, in initialize
super(TerminalIPythonApp, self).initialize(argv) File "", line 2, in initialize File
"/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/application.py",
line 92, in catch_config_error
return method(app, *args, **kwargs) File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/core/application.py",
line 371, in initialize
self.parse_command_line(argv) File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/terminal/ipapp.py",
line 309, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv) File "", line 2, in parse_command_line File
"/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/application.py",
line 92, in catch_config_error
return method(app, *args, **kwargs) File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/application.py",
line 474, in parse_command_line
return self.initialize_subcommand(subc, subargv) File "", line 2, in initialize_subcommand File
"/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/application.py",
line 92, in catch_config_error
return method(app, *args, **kwargs) File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/config/application.py",
line 405, in initialize_subcommand
subapp = import_item(subapp) File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/utils/importstring.py",
line 42, in import_item
module = import(package, fromlist=[obj]) File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/html/notebookapp.py",
line 75, in
from IPython.consoleapp import IPythonConsoleApp File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/consoleapp.py",
line 43, in
from IPython.kernel.zmq.kernelapp import ( File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/kernel/zmq/kernelapp.py",
line 54, in
from .ipkernel import Kernel File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/kernel/zmq/ipkernel.py", line 40, in
from .zmqshell import ZMQInteractiveShell File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/kernel/zmq/zmqshell.py", line 36, in
from IPython.core.payloadpage import install_payload_page File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/core/payloadpage.py",
line 24, in
from docutils.core import publish_string File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/docutils/core.py",
line 20, in
from docutils import frontend, io, utils, readers, writers File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/docutils/frontend.py",
line 41, in
import docutils.utils File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/docutils/utils/init.py",
line 20, in
import docutils.io File "/Users/tayyangki/anaconda/lib/python2.7/site-packages/docutils/io.py",
line 18, in
from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput File
"/Users/tayyangki/anaconda/lib/python2.7/site-packages/docutils/utils/error_reporting.py",
line 47, in
locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1] File
"/Users/tayyangki/anaconda/lib/python2.7/locale.py", line 511, in
getdefaultlocale
return _parse_localename(localename) File "/Users/tayyangki/anaconda/lib/python2.7/locale.py", line 443, in
_parse_localename
raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8
Greatly appreciated if someone could help me?
As noted here, the workaround for the "unknown locale: UTF-8" issue to add:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
to your to your ~/.bash_profile.
thanks for the info but I have found out the problems a few weeks ago and have forgotten to post it here....
It is just that for Mac installation, it is pretty tricky and hence while installing, instead of typing in: easy_install ipython, users have to specify the python version.
Thus, I will need to type in easy_install ipython2.7
After which all is fine and working great!

Google Apis Client Generator Python Not Running

I'm trying to execute Google APIs Client Generator to build new ADMIN-SDK for Java Language however I'm stuck in the generator, I've tried step by step using python2.6 and python2.7 both had similar outputs.
$ python $(/bin/pwd)/googleapis/codegen/generate_library.py --api_name=plus --api_version=v1 --language=java --output_dir=/tmp/gen --language=java
Traceback (most recent call last): File
"/Users/alejacquet/Development/git/google-apis-client-generator/src/googleapis/codegen/generate_library.py",
line 245, in
app.run() File "/Library/Python/2.7/site-packages/google_apputils-0.3.0-py2.7.egg/google/apputils/app.py",
line 216, in run
return _actual_start() File "/Library/Python/2.7/site-packages/google_apputils-0.3.0-py2.7.egg/google/apputils/app.py",
line 244, in _actual_start
really_start() File "/Library/Python/2.7/site-packages/google_apputils-0.3.0-py2.7.egg/google/apputils/app.py",
line 203, in really_start
sys.exit(main(argv)) File "/Users/alejacquet/Development/git/google-apis-client-generator/src/googleapis/codegen/generate_library.py",
line 152, in main
language_variant=FLAGS.language_variant) File "/Users/alejacquet/Development/git/google-apis-client-generator/src/googleapis/codegen/generate_library.py",
line 179, in Generate
language_variations = Targets().VariationsForLanguage(language) File
"/Users/alejacquet/Development/git/google-apis-client-generator/src/googleapis/codegen/targets.py",
line 68, in init
files.GetFileContents(self.targets_path)) File "/Users/alejacquet/Development/git/google-apis-client-generator/src/googleapis/codegen/json_with_comments.py",
line 54, in Loads
return json.loads(stripped, **kw) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py",
line 326, in loads
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py",
line 366, in decode File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py",
line 382, in raw_decode ValueError: Expecting property name: line 9
column 9 (char 198)
Any ideas?
You may have to specify --language_variant=XXX, where XXX is one of the directory names under .../templates/java

Resources