spyder- anaconda stop working suddenly after installing ax-platform lib - python

i working in spyder for long time, but after i install ax-platform lib it stop working and out this error massage
i tried to uninstall it from anaconda then reinstall it again but the same error appeared
could any help me how to fix it
the error massage as follows
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\spyder-script.py", line 10, in
sys.exit(main())
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\start.py", line 205, in main
mainwindow.main()
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3734, in main
mainwindow = run_spyder(app, options, args)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3590, in run_spyder
main.setup()
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 977, in setup
'spyder.plugins.{}'.format(plugin_name))
File "C:\ProgramData\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\pylint\__init__.py", line 14, in
from .plugin import Pylint as PLUGIN_CLASS
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\pylint\plugin.py", line 29, in
from spyder.plugins.pylint.confpage import PylintConfigPage
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\pylint\confpage.py", line 16, in
from spyder.plugins.pylint.widgets.pylintgui import PylintWidget
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\pylint\widgets\pylintgui.py", line 37, in
from spyder.plugins.pylint.utils import get_pylintrc_path
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\pylint\utils.py", line 16, in
import pylint.config
File "C:\ProgramData\Anaconda3\lib\site-packages\pylint\config.py", line 54, in
import toml
ModuleNotFoundError: No module named 'toml'

Something probably changed in dependencies, this solved the issue for me:
conda install toml

Related

Pip is broken, gives PermissionError: [WinError 32]

I installed the python-certifi-win32 module (I'm so busy trying to fix this problem that I don't even remember why I originally installed it). Right after I installed it, though, I started getting this error when I run pip (extended error code below): PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\user1\\AppData\\Local\\Temp\\tmph93rz74c'
When I delete the file C:\\Users\\user1\\AppData\\Local\\Temp\\tmph93rz74c, another file pops up in its place, just with a different random combination of letters and numbers, and the error says the new file name instead.
I have no idea how to fix it, my pip hasn't been working for days. I've looked through tens of pages of google results.
Full error code:
Traceback (most recent call last):
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\Scripts\pip.exe\__main__.py", line 4, in <module>
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\main.py", line 9, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\autocompletion.py", line 10, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\cmdoptions.py", line 23, in <module>
from pip._internal.cli.parser import ConfigOptionParser
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\parser.py", line 12, in <module>
from pip._internal.configuration import Configuration, ConfigurationError
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\configuration.py", line 20, in <module>
from pip._internal.exceptions import (
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\exceptions.py", line 13, in <module>
from pip._vendor.requests.models import Request, Response
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\requests\__init__.py", line 135, in <module>
from . import utils
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\requests\utils.py", line 27, in <module>
from . import certs
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 170, in exec_module
notify_module_loaded(module)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_pip.py", line 35, in apply_patches
import certifi
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 170, in exec_module
notify_module_loaded(module)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_certifi.py", line 20, in apply_patches
certifi_win32.wincerts.CERTIFI_PEM = certifi.where()
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi\core.py", line 37, in where
_CACERT_PATH = str(_CACERT_CTX.__enter__())
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 135, in __enter__
return next(self.gen)
File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\importlib\_common.py", line 95, in _tempfile
os.remove(raw_path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\user1\\AppData\\Local\\Temp\\tmph93rz74c'
I ran into the same problem after installing python-certifi-win32. I installed this package in the hope to solve errors caused by the self-signed certificate used by our SSL Inspection infrastructure.
To bring pip back to a running state remove python-certifi-win32 from the installation folder:
Determine the installation path for pip packages (source):
python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
Switch to the folder and delete the package's files:
del python-certifi-win32-init.pth
rmdir /s/q python_certifi_win32-1.6.dist-info
I could observe the same error pattern when upgrading from Python 3.9 to Python 3.10. Somehow python-certifi-win32 seems to be malfunctioning in certain scenarios then.
Andrew Leech, the author of python-certifi-win32, suggests to move on to his other project pip-system-certs . Drop-in replacing the library with pip-system-certs (PyPI link) solved all issues for me.
the only solution to this problem is to delete Python from control panel.Then completely delete the Python folder from the address below
windows:
C:\Users\user1\AppData\Local\Programs\python
and linux base:
/bin/python3

Anaconda - Spyder no longer launching

I've been using anaconda Spyder for a few weeks for one of my classes and when I anaconda today, Spyder was not listed as installed. So I updated anaconda and restarted my MacBook and Spyder was back. Now, when I try launch Spyder, I get this error:
unittest: No module named 'lxml'
Traceback (most recent call last):
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/find_plugins.py", line 119, in find_external_plugins
mod = importlib.import_module(entry_point.module_name)
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder_unittest/__init__.py", line 9, in
from .unittestplugin import UnitTestPlugin as PLUGIN_CLASS
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder_unittest/unittestplugin.py", line 21, in
from spyder_unittest.widgets.unittestgui import UnitTestWidget
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder_unittest/widgets/unittestgui.py", line 26, in
from spyder_unittest.backend.noserunner import NoseRunner
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder_unittest/backend/noserunner.py", line 9, in
from lxml import etree
ModuleNotFoundError: No module named 'lxml'
Traceback (most recent call last):
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/utils.py", line 281, in create_window
main.setup()
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py", line 850, in setup
internal_plugins = find_internal_plugins()
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/find_plugins.py", line 92, in find_internal_plugins
mod = importlib.import_module(entry_point.module_name)
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/findinfiles/plugin.py", line 18, in
from spyder.plugins.findinfiles.widgets import FindInFilesWidget
ImportError: cannot import name 'FindInFilesWidget' from 'spyder.plugins.findinfiles.widgets' (/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/findinfiles/widgets/__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/aidenwalsh/opt/anaconda3/bin/spyder", line 11, in
sys.exit(main())
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/start.py", line 237, in main
mainwindow.main(options, args)
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py", line 1992, in main
mainwindow = create_window(MainWindow, app, splash, options, args)
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/utils.py", line 283, in create_window
if main.console is not None:
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py", line 1088, in __getattr__
return self.get_plugin(self._INTERNAL_PLUGINS_MAPPING[attr])
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py", line 165, in get_plugin
raise SpyderAPIError(f'Plugin "{plugin_name}" not found!')
spyder.api.exceptions.SpyderAPIError: Plugin "internal_console" not found!
Ive tried reinstalling Spyder, using a different version of Spyder, but I can't seem to get past this error. If anyone could help id really appreciate it, I need to use this software for my class.
New error:
main.setup()
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py", line 850, in setup
internal_plugins = find_internal_plugins()
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/find_plugins.py", line 92, in find_internal_plugins
mod = importlib.import_module(entry_point.module_name)
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/findinfiles/plugin.py", line 18, in
from spyder.plugins.findinfiles.widgets import FindInFilesWidget
ImportError: cannot import name 'FindInFilesWidget' from 'spyder.plugins.findinfiles.widgets' (/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/plugins/findinfiles/widgets/__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/aidenwalsh/opt/anaconda3/bin/spyder", line 11, in
sys.exit(main())
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/start.py", line 237, in main
mainwindow.main(options, args)
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py", line 1992, in main
mainwindow = create_window(MainWindow, app, splash, options, args)
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/utils.py", line 283, in create_window
if main.console is not None:
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py", line 1088, in __getattr__
return self.get_plugin(self._INTERNAL_PLUGINS_MAPPING[attr])
File "/Users/aidenwalsh/opt/anaconda3/lib/python3.9/site-packages/spyder/app/mainwindow.py", line 165, in get_plugin
raise SpyderAPIError(f'Plugin "{plugin_name}" not found!')
spyder.api.exceptions.SpyderAPIError: Plugin "internal_console" not found!```
Try resetting spyder
conda activate your_spyder_env
spyder --reset
If that doesn't work try deleting the history lcoated as below and then re-running/reinstalling
user_dir/.config/spyder-py3
If that doesn't work try uninstalling, checking that all the files have been fully removed as below, updating conda, then reinstalling in a new environment
conda activate your_spyder_env
conda remove spyder
Check and make sure below or equivalent has properly removed.
Note: Your first and last name appear to be present in the logs, just a headsup in case you want to obscure it from the web
user_dir/opt/anaconda3/lib/python3.9/site-packages/spyder
Reinstall
conda update anaconda
conda create --name new_spyder_env spyder
I can observe some problems but the first can be solved by instaling LXML
pip install lxml
Try to install from the terminal.
Then shre with us the results

pip install not working / responding - stuck until cancelled

When I try using pip install it freezes until I cancel the operation. I get the same with pip list.
I'm running on WSL Ubuntu 20.04 but I have no DNS issues. Tried with Google DNS, and WSL default, but didn't work.
Adding verbose -vvv does nothing different. Trying to upgrade pip gives the same behavior.
$ pip --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
$ python3 --version
Python 3.8.10
Traceback:
^CTraceback (most recent call last):
File "/usr/bin/pip", line 11, in <module>
load_entry_point('pip==20.0.2', 'console_scripts', 'pip')()
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/usr/lib/python3/dist-packages/pip/_internal/commands/__init__.py", line 96, in create_command
module = importlib.import_module(module_path)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 24, in <module>
from pip._internal.cli.req_command import RequirementCommand
File "/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py", line 19, in <module>
from pip._internal.network.session import PipSession
File "/usr/lib/python3/dist-packages/pip/_internal/network/session.py", line 26, in <module>
from pip._internal.network.auth import MultiDomainBasicAuth
File "/usr/lib/python3/dist-packages/pip/_internal/network/auth.py", line 36, in <module>
import keyring # noqa
File "/usr/lib/python3/dist-packages/keyring/__init__.py", line 3, in <module>
from .core import (
File "/usr/lib/python3/dist-packages/keyring/core.py", line 189, in <module>
init_backend()
File "/usr/lib/python3/dist-packages/keyring/core.py", line 93, in init_backend
keyrings = filter(limit, backend.get_all_keyring())
File "/usr/lib/python3/dist-packages/keyring/util/__init__.py", line 21, in wrapper
func.always_returns = func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/keyring/backend.py", line 210, in get_all_keyring
return list(rings)
File "/usr/lib/python3/dist-packages/keyring/util/__init__.py", line 31, in suppress_exceptions
for callable in callables:
File "/usr/lib/python3/dist-packages/keyring/util/properties.py", line 26, in __get__
return self.fget.__get__(None, owner)()
File "/usr/lib/python3/dist-packages/keyring/backend.py", line 67, in viable
cls.priority
File "/usr/lib/python3/dist-packages/keyring/util/properties.py", line 26, in __get__
return self.fget.__get__(None, owner)()
File "/usr/lib/python3/dist-packages/keyring/backends/kwallet.py", line 37, in priority
bus = dbus.SessionBus(mainloop=DBusGMainLoop())
File "/usr/lib/python3/dist-packages/dbus/_dbus.py", line 212, in __new__
return Bus.__new__(cls, Bus.TYPE_SESSION, private=private,
File "/usr/lib/python3/dist-packages/dbus/_dbus.py", line 102, in __new__
bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 124, in __new__
bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
File "/usr/lib/python3/dist-packages/dbus/exceptions.py", line 47, in __init__
def __init__(self, *args, **kwargs):
KeyboardInterrupt
This worked for me, as I had done some X11 setup recently:
unset DISPLAY
I have no idea how that could be related but it did the trick.
Source: https://github.com/pypa/pip/issues/7883#issuecomment-852102601

ImportError: cannot import name 'ensure_str' from 'six' (/usr/lib/python3.8/site-packages/six.py)

I am receiving this error on multiple commands, similar to the problem explained in this question. But I am not even able to run it in sudo, non-sudo(if thats a thing) and also root account(I specifically logged into the root account to run this, but failed)
Here is the error I am thrown every time.
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in <module>
load_entry_point('pip==20.0.2', 'console_scripts', 'pip')()
File "/usr/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "/usr/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 96, in create_command
module = importlib.import_module(module_path)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3.8/site-packages/pip/_internal/commands/freeze.py", line 12, in <module>
from pip._internal.operations.freeze import freeze
File "/usr/lib/python3.8/site-packages/pip/_internal/operations/freeze.py", line 17, in <module>
from pip._internal.req.constructors import (
File "/usr/lib/python3.8/site-packages/pip/_internal/req/__init__.py", line 11, in <module>
from .req_file import parse_requirements
File "/usr/lib/python3.8/site-packages/pip/_internal/req/req_file.py", line 25, in <module>
from pip._internal.req.constructors import (
File "/usr/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 28, in <module>
from pip._internal.req.req_install import InstallRequirement
File "/usr/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 30, in <module>
from pip._internal.operations.install.wheel import install_wheel
File "/usr/lib/python3.8/site-packages/pip/_internal/operations/install/wheel.py", line 33, in <module>
from pip._internal.utils.wheel import parse_wheel
File "/usr/lib/python3.8/site-packages/pip/_internal/utils/wheel.py", line 12, in <module>
from pip._vendor.six import PY2, ensure_str
ImportError: cannot import name 'ensure_str' from 'six' (/usr/lib/python3.8/site-packages/six.py)
Note : I was initially trying to install tensorflow, then other commands like pip freeze and pip uninstall some-package also threw this error.
I have already tried reinstalling pip without any errors. I am on Manjaro, so i ran
pacman -Rcn python-pip
and then
pacman -S python-pip
$ pacman -S extra/python-six did the trick!

Not able to create or import existing conda project in Pycharm

I am trying to create or open existing conda project in PyCharm. In both cases I get this error:
TypeError: LoadLibrary() argument 1 must be str, not None
I have Anaconda3 package installed (conda 4.7.5) on my Windows machine. I was able to use it successfully from Anaconda Prompt (create and use environments, install packages and create project). But every time I try to create a project in PyCharm by selecting "File -> New Project -> Scientific -> New environment using Conda" with Python 3.6 I am getting the error above while the project is being created.
Alternatively, when I open existing conda project (from Anaconda Prompt) in PyCharm and then trying to select conda as interpreter I am getting exact same error.
I have been trying to solve this problem for 3 hours: reading forums, installing older versions, trying miniconda instead. Is that the problem with PyCharm?
Edit: Attached full stack trace.
Traceback (most recent call last):
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\exceptions.py", line 1043, in __call__
return func(*args, **kwargs)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 80, in do_call
module = import_module(relative_mod, __name__.rsplit('.', 1)[0])
File "C:\Users\Eduard\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\cli\main_create.py", line 10, in <module>
from .install import install
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\cli\install.py", line 19, in <module>
from ..core.index import calculate_channel_urls, get_index
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\core\index.py", line 9, in <module>
from .package_cache_data import PackageCacheData
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 15, in <module>
from conda_package_handling.api import InvalidArchiveError
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda_package_handling\api.py", line 3, in <module>
from libarchive.exception import ArchiveError as _LibarchiveArchiveError
File "C:\Users\Eduard\Anaconda3\lib\site-packages\libarchive\__init__.py", line 1, in <module>
from .entry import ArchiveEntry
File "C:\Users\Eduard\Anaconda3\lib\site-packages\libarchive\entry.py", line 6, in <module>
from . import ffi
File "C:\Users\Eduard\Anaconda3\lib\site-packages\libarchive\ffi.py", line 27, in <module>
libarchive = ctypes.cdll.LoadLibrary(libarchive_path)
File "C:\Users\Eduard\Anaconda3\lib\ctypes\__init__.py", line 434, in LoadLibrary
return self._dlltype(name)
File "C:\Users\Eduard\Anaconda3\lib\ctypes\__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be str, not None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Eduard\Anaconda3\Scripts\conda-script.py", line 12, in <module>
sys.exit(main())
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\cli\main.py", line 150, in main
return conda_exception_handler(_main, *args, **kwargs)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\exceptions.py", line 1335, in conda_exception_handler
return_value = exception_handler(func, *args, **kwargs)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\exceptions.py", line 1046, in __call__
return self.handle_exception(exc_val, exc_tb)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\exceptions.py", line 1090, in handle_exception
return self.handle_unexpected_exception(exc_val, exc_tb)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\exceptions.py", line 1101, in handle_unexpected_exception
self.print_unexpected_error_report(error_report)
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\exceptions.py", line 1171, in print_unexpected_error_report
from .cli.main_info import get_env_vars_str, get_main_info_str
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\cli\main_info.py", line 19, in <module>
from ..core.index import _supplement_index_with_system
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\core\index.py", line 9, in <module>
from .package_cache_data import PackageCacheData
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 15, in <module>
from conda_package_handling.api import InvalidArchiveError
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda_package_handling\api.py", line 7, in <module>
from .tarball import CondaTarBZ2 as _CondaTarBZ2
File "C:\Users\Eduard\Anaconda3\lib\site-packages\conda_package_handling\tarball.py", line 7, in <module>
import libarchive
File "C:\Users\Eduard\Anaconda3\lib\site-packages\libarchive\__init__.py", line 1, in <module>
from .entry import ArchiveEntry
File "C:\Users\Eduard\Anaconda3\lib\site-packages\libarchive\entry.py", line 6, in <module>
from . import ffi
File "C:\Users\Eduard\Anaconda3\lib\site-packages\libarchive\ffi.py", line 27, in <module>
libarchive = ctypes.cdll.LoadLibrary(libarchive_path)
File "C:\Users\Eduard\Anaconda3\lib\ctypes\__init__.py", line 434, in LoadLibrary
return self._dlltype(name)
File "C:\Users\Eduard\Anaconda3\lib\ctypes\__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be str, not None
I was getting the same issue while making a conda environment through command prompt. I added this in my environment variables. It helped in my case. Maybe it can help you as well
Your path to anaconda folder/Anaconda3/library/bin

Categories