Spyder startup trouble - python

I have troubles to start Spyder.
This is the error message:
Traceback (most recent call last):
File "/Applications/anaconda3/bin/spyder", line 7, in
from spyder.app.start import main
File "/Applications/anaconda3/lib/python3.6/site-packages/spyder/app/start.py", line 27, in
from spyder.config.main import CONF
File "/Applications/anaconda3/lib/python3.6/site-packages/spyder/config/main.py", line 22, in
from spyder.config.user import UserConfig
File "/Applications/anaconda3/lib/python3.6/site-packages/spyder/config/user.py", line 26, in
from spyder.utils.programs import check_version
File "/Applications/anaconda3/lib/python3.6/site-packages/spyder/utils/programs.py", line 18, in
import subprocess
File "/Applications/anaconda3/lib/python3.6/subprocess.py", line 136, in
import _posixsubprocess
ImportError: dlopen(/Applications/anaconda3/lib/python3.6/lib-dynload/_posixsubprocess.cpython-36m-darwin.so, 2): Symbol not found: __Py_set_inheritable_async_safe
Referenced from: /Applications/anaconda3/lib/python3.6/lib-dynload/_posixsubprocess.cpython-36m-darwin.so
Expected in: flat namespace
in /Applications/anaconda3/lib/python3.6/lib-dynload/_posixsubprocess.cpython-36m-darwin.so
Somebody have an idea of what's going on?

(Spyder maintainer here) To fix this you need to open Terminal.app and run there
conda update python python.app spyder

run
conda update --all
can solve this problem!

Related

Idle3 editor fail to open in Fedora 36

I am currently unable to open Idle3 editor. I am running Linux Fedora 36, when idle3 command is issued I get this:
Traceback (most recent call last):
File "/usr/bin/idle3", line 3, in <module> from idlelib.pyshell import main
File "/usr/lib64/python3.10/idlelib/pyshell.py", line 53, in <module> from idlelib import debugger
File "/usr/lib64/python3.10/idlelib/debugger.py", line 7, in <module> from idlelib import macosx
File "/usr/lib64/python3.10/idlelib/macosx.py", line 7, in <module> from test.support import requires, ResourceDenied
ModuleNotFoundError: No module named 'test'
I don't know how to solve it.
Fortunatelly the trouble with Idle3 was solved in the recent update of Fedora 36, I think the missing file was inserted.

ImportError: cannot import name 'KernelProvisionerBase' from 'jupyter_client.provisioning'

Very messy tonight. It was working fine before until I tried to upgrade tensorflow to 2.6. it failed, then all other packages also broke. for example, I cannot launch jupypter notebook. I did try to upgrade it by using conda update jupyter. Thanks for your help.
(forecast) C:\Python_Sync\ML timeseries>jupyter notebook
Traceback (most recent call last):
File "C:\Users\test\miniconda3\envs\forecast\Scripts\jupyter-notebook-script.py", line 5, in <module>
from notebook.notebookapp import main
File "C:\Users\test\miniconda3\envs\forecast\lib\site-packages\notebook\notebookapp.py", line 78, in <module>
from .services.kernels.kernelmanager import MappingKernelManager, AsyncMappingKernelManager
File "C:\Users\test\miniconda3\envs\forecast\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 18, in <module>
from jupyter_client.session import Session
File "C:\Users\test\miniconda3\envs\forecast\lib\site-packages\jupyter_client\__init__.py", line 11, in <module>
from .manager import AsyncKernelManager # noqa
File "C:\Users\test\miniconda3\envs\forecast\lib\site-packages\jupyter_client\manager.py", line 29, in <module>
from .provisioning import KernelProvisionerBase
ImportError: cannot import name 'KernelProvisionerBase' from 'jupyter_client.provisioning' (unknown location)
ok, i ended up solving this after:
conda update --all

I have broken my poetry installation, and I don't know where to begin to fix it

I was using poetry in combination with pyenv for some hobby projects. I created some virtualenvs with pyenv inside some poetry hobby projects. For some reason, I deleted some of these python installs that broke the virtualenvs within these projects and now poetry won't work anymore. I'm getting this message when I try to start poetry. I'm using Linux Mint 20.1:
/home/milkman/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
"program uses threads.", RuntimeWarning)
Traceback (most recent call last):
File "/home/milkman/.poetry/bin/poetry", line 16, in <module>
from poetry.console import main
File "/home/milkman/.poetry/lib/poetry/console/__init__.py", line 1, in <module>
from .application import Application
File "/home/milkman/.poetry/lib/poetry/console/application.py", line 7, in <module>
from .commands.about import AboutCommand
File "/home/milkman/.poetry/lib/poetry/console/commands/__init__.py", line 4, in <module>
from .check import CheckCommand
File "/home/milkman/.poetry/lib/poetry/console/commands/check.py", line 2, in <module>
from poetry.factory import Factory
File "/home/milkman/.poetry/lib/poetry/factory.py", line 18, in <module>
from .repositories.pypi_repository import PyPiRepository
File "/home/milkman/.poetry/lib/poetry/repositories/pypi_repository.py", line 33, in <module>
from ..inspection.info import PackageInfo
File "/home/milkman/.poetry/lib/poetry/inspection/info.py", line 25, in <module>
from poetry.utils.env import EnvCommandError
File "/home/milkman/.poetry/lib/poetry/utils/env.py", line 23, in <module>
import virtualenv
File "/home/milkman/.poetry/lib/poetry/_vendor/py2.7/virtualenv/__init__.py", line 3, in <module>
from .run import cli_run, session_via_cli
File "/home/milkman/.poetry/lib/poetry/_vendor/py2.7/virtualenv/run/__init__.py", line 13, in <module>
from .plugin.activators import ActivationSelector
File "/home/milkman/.poetry/lib/poetry/_vendor/py2.7/virtualenv/run/plugin/activators.py", line 6, in <module>
from .base import ComponentBuilder
File "/home/milkman/.poetry/lib/poetry/_vendor/py2.7/virtualenv/run/plugin/base.py", line 5, in <module>
from backports.entry_points_selectable import entry_points
ImportError: No module named entry_points_selectable
I have no idea where to start to fix this. Anytime I try a command with poetry I get this same message. Can anyone point me in the right direction?
Thank you!
May be you have deleted some library files. You can try removing poetry and all libraries that your app is using. Start fresh installation of poetry.
You can use pip to install and uninstall.
Other wise start a new project from fresh.
It appears you accidentally deleted some of the library's functions. Try just removing it and reinstalling.

Launch of orange3

I tried to launch of Orange 3 on Anaconda. But launch have produced errors below.
Traceback (most recent call last):
File "C:\Users\tomo\Anaconda2\envs\orange3\Scripts\orange-canvas-script.py", line 6, in
from Orange.canvas.__main__ import main
File "C:\Users\tomo\Anaconda2\envs\orange3\lib\site-packages\Orange\canvas\__main__.py", line 30, in
from Orange.canvas.application.canvasmain import CanvasMainWindow
File "C:\Users\tomo\Anaconda2\envs\orange3\lib\site-packages\Orange\canvas\application\canvasmain.py", line 61, in
from .canvastooldock import CanvasToolDock, QuickCategoryToolbar, \
File "C:\Users\tomo\Anaconda2\envs\orange3\lib\site-packages\Orange\canvas\application\canvastooldock.py", line 25, in
from ..document.quickmenu import MenuPage
File "C:\Users\tomo\Anaconda2\envs\orange3\lib\site-packages\Orange\canvas\document\__init__.py", line 17, in
from .schemeedit import SchemeEditWidget
File "C:\Users\tomo\Anaconda2\envs\orange3\lib\site-packages\Orange\canvas\document\schemeedit.py", line 37, in
from .suggestions import Suggestions
File "C:\Users\tomo\Anaconda2\envs\orange3\lib\site-packages\Orange\canvas\document\suggestions.py", line 7, in
from .interactions import NewLinkAction
File "C:\Users\tomo\Anaconda2\envs\orange3\lib\site-packages\Orange\canvas\document\interactions.py", line 28, in
from ..canvas import items
File "C:\Users\tomo\Anaconda2\envs\orange3\lib\site-packages\Orange\canvas\canvas\items\__init__.py", line 9, in
from .annotationitem import TextAnnotation, ArrowAnnotation
File "C:\Users\tomo\Anaconda2\envs\orange3\lib\site-packages\Orange\canvas\canvas\items\annotationitem.py", line 7, in
import CommonMark
ModuleNotFoundError: No module named 'CommonMark'
Acutually I found these error on this web and tried to install the r-commonmark 1.4 but it does not work well now.
Please tell me how to deal with it.
CommonMark is a package that Orange used. It was renamed in the latest release what causes that imports do not work. The issue should be solved by installing newer Orange3 version3.16.0

Cannot run anaconda

I just installed anaconda and I have udpated the PATH variable.
However, I cannot run any conda related commands.
Every time I run a command starting with "conda" I get the following error.
Can anyone help?
I am using macOs High Sierra 10.13.6.
Traceback (most recent call last):
File "/anaconda3/lib/python3.6/site-packages/conda/common/path.py", line 18, in <module>
from urllib.request import url2pathname
File "/anaconda3/lib/python3.6/urllib/request.py", line 2585, in <module>
from _scproxy import _get_proxy_settings, _get_proxies
ImportError: dlopen(/anaconda3/lib/python3.6/lib-dynload/_scproxy.cpython-36m-darwin.so, 2): Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /anaconda3/lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/anaconda3/bin/conda", line 11, in <module>
sys.exit(main())
File "/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 112, in main
from ..exceptions import conda_exception_handler
File "/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 18, in <module>
from .common.io import timeout
File "/anaconda3/lib/python3.6/site-packages/conda/common/io.py", line 24, in <module>
from .path import expand
File "/anaconda3/lib/python3.6/site-packages/conda/common/path.py", line 21, in <module>
from urllib import unquote, url2pathname # NOQA
ImportError: cannot import name 'unquote'
I seem to recall something similar when I first ran Anaconda on my Mac as well. I believe I solved it by doing two things:
Uninstalling Anaconda (Link)
Reinstalling Anaconda (potentially in a different location, say, under your User home)
I think in the process of installation my PATH pointed finally to a different location than the Conda/Python install.

Categories

Resources