Anaconda-navigator won't start - python

I believe that I installed Anaconda Naviagtor on linux correctly but it is getting stuck on loading applications....
(base) ben#Bens-PC:~$ anaconda-navigator
Traceback (most recent call last):
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py", line 541, in setup
self.post_setup(conda_data=conda_data)
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/main_window.py", line 578, in post_setup
self.tab_home.setup(conda_data)
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/tabs/home.py", line 169, in setup
self.set_applications(applications, packages)
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/widgets/tabs/home.py", line 204, in set_applications
apps = self.api.process_apps(applications, prefix=self.current_prefix)
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/anaconda_api.py", line 848, in process_apps
app = app(config=self.config, process_api=self._process_api, conda_api=self._conda_api)
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/vscode.py", line 48, in __init__
**kwargs
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/base.py", line 43, in __init__
self.init()
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/base.py", line 60, in init
SUBDIR, INST_EXT, INST_DIR = self._find_linux_install_dir()
File "/home/ben/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/vscode.py", line 168, in _find_linux_install_dir
if DISTRO_NAME in ['ubuntu', 'debian']:
UnboundLocalError: local variable 'DISTRO_NAME' referenced before assignment
Any help would be great!

Try
conda update anaconda-navigator

Open and Edit the file:
".../anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/vscode.py"
Declare this in line 159.
DISTRO_NAME = None
Indent this line with the if statement above it.

Related

When I need Initialize a new site in ERPNext

when I write the command line in terminal
bench new-site site1.local
This Error Will shown
> Traceback (most recent call last):
File "/home/ubuntu/.local/bin/bench", line 8, in <module>
sys.exit(cli())
File "/home/ubuntu/bench/bench/cli.py", line 71, in cli
cmd_from_sys = get_cmd_from_sysargv()
File "/home/ubuntu/bench/bench/utils/__init__.py", line 554, in get_cmd_from_sysargv
if sys_argv.index(arg) == 0 and arg in Bench(".").apps:
File "/home/ubuntu/bench/bench/bench.py", line 67, in __init__
self.apps = BenchApps(self)
File "/home/ubuntu/bench/bench/bench.py", line 174, in __init__
self.initialize_apps()
File "/home/ubuntu/bench/bench/bench.py", line 281, in initialize_apps
self.apps.remove("frappe")
ValueError: list.remove(x): x not in list
Note I use EC2 On AWS Ubunto server
Can Any One Help With This Problem Please.
I tried to install many lib but no help with this problem

Chialisp environment set up

I'm following along with this video:
https://www.youtube.com/watch?v=y8Thrrw25rQ&list=PLmnzWPUjpmaGzFNq2PeMljHNrXGwj2TDY&index=1
trying to set up my dev environment for chialisp.
Installed python, created virtual environment, ran pip install chia-dev-tools (got this working after installing c++ buildtools). All looks to work fine but when i run the chia --help command I'm getting errors
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\chialisp\chiatest1\venv\Scripts\chia.exe_main.py", line 4, in
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\cmds\chia.py", line 18, in
from chia.cmds.peer import peer_cmd
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\cmds\peer.py", line 7, in
from chia.cmds.cmds_util import NODE_TYPES
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\cmds\cmds_util.py", line 17, in
from chia.rpc.wallet_rpc_client import WalletRpcClient
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\rpc\wallet_rpc_client.py", line 3, in
from chia.data_layer.data_layer_wallet import Mirror, SingletonRecord
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\data_layer\data_layer_wallet.py", line 42, in
from chia.wallet.outer_puzzles import AssetType
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\wallet\outer_puzzles.py", line 8, in
from chia.wallet.cat_wallet.cat_outer_puzzle import CATOuterPuzzle
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\wallet\cat_wallet\cat_outer_puzzle.py", line 11, in
from chia.wallet.cat_wallet.cat_utils import (
File "C:\chialisp\chiatest1\venv\Lib\site-packages\chia\wallet\cat_wallet\cat_utils.py", line 24, in
#dataclasses.dataclass
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tony\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 1220, in dataclass
return wrap(cls)
^^^^^^^^^
File "C:\Users\tony\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 1210, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tony\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tony\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'chia.types.blockchain_format.program.Program'> for field limitations_solution is not allowed: use default_factory
Any thoughts on where I might be going wrong??
For future reference I had to run this command
Set-Alias -Name chia "C:\Users[insert user here]\AppData\Local\Programs\Chia\resources\app.asar.unpacked\daemon\chia.exe"

Anaconda Spyder doesn't launch

I'm trying to open Spyder and I have deleted multiple times the "spyder.lock" folder in user/directory but it doesn't work. This is the error:
File "C:\Users\pc-acer\anaconda3\envs\EnvTest\Scripts\spyder-script.py", line 10, in <module>
sys.exit(main())
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\app\start.py", line 212, in main
mainwindow.main(options, args)
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\app\mainwindow.py", line 3685, in main
mainwindow = run_spyder(app, options, args)
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\app\mainwindow.py", line 3571, in run_spyder
main.setup()
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\app\mainwindow.py", line 886, in setup
from spyder.plugins.completion.plugin import CompletionManager
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\plugins\completion\plugin.py", line 22, in <module>
from spyder.plugins.completion.languageserver.plugin import (
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\plugins\completion\languageserver\plugin.py", line 31, in <module>
from spyder.plugins.completion.languageserver.confpage import (
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\plugins\completion\languageserver\confpage.py", line 31, in <module>
from spyder.plugins.completion.languageserver.widgets.snippetsconfig import (
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\spyder\plugins\completion\languageserver\widgets\snippetsconfig.py", line 17, in <module>
from jsonschema import validate as json_validate
File "C:\Users\pc-acer\Anaconda3\Lib\site-packages\jsonschema\__init__.py", line 34, in <module>
__version__ = metadata.version("jsonschema")
File "C:\Users\pc-acer\anaconda3\envs\EnvTest\lib\importlib\metadata.py", line 531, in version
return distribution(distribution_name).version
File "C:\Users\pc-acer\anaconda3\envs\EnvTest\lib\importlib\metadata.py", line 236, in version
return self.metadata['Version']
File "C:\Users\pc-acer\anaconda3\envs\EnvTest\lib\importlib\metadata.py", line 224, in metadata
self.read_text('METADATA')
File "C:\Users\pc-acer\anaconda3\envs\EnvTest\lib\importlib\metadata.py", line 491, in read_text
return self._path.joinpath(filename).read_text(encoding='utf-8')
AttributeError: 'WindowsPath' object has no attribute 'read_text'
I don't know what i have to do. Please help!
There might be 2 situation
You are using older version of python or something messed up so try reinstalling newer version of python
conda missing some dependencies.
conda upgrade spyder
Check this thread.

Python3.9.0 Idle Wont Open How Do I Fix This?

I am not sure why my python 3.9 idle isnt opening VIDEO I have tried multiple times but it still isnt opening for me
I tried repairing it in control panel but it still isnt working
I also tried to reinstall it but I am still having the same problem it just wont open no matter how much I click
my idle path on my folder enter image description here
C:\Users\Habib\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.9
on my IDle properties it says V
TARGET: C:\Users\Habib\AppData\Local\Programs\Python\Python39\pythonw.exe "C:\Users\Habib\AppData\Local\Programs\Python\Python39\Lib\idlelib\idle.pyw"
START: C:\Users\Habib\AppData\Local\Programs\Python\Python39\
OUTPUT I GET WHEN I PUT py -m idlelib
Traceback (most recent call last):
File "C:\Users\Habib\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Habib\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Habib\AppData\Local\Programs\Python\Python39\lib\idlelib\__main__.py", line 6, in <module>
import idlelib.pyshell
File "C:\Users\Habib\AppData\Local\Programs\Python\Python39\lib\idlelib\pyshell.py", line 49, in <module>
from idlelib.colorizer import ColorDelegator
File "C:\Users\Habib\AppData\Local\Programs\Python\Python39\lib\idlelib\colorizer.py", line 6, in <module>
from idlelib.config import idleConf
File "C:\Users\Habib\AppData\Local\Programs\Python\Python39\lib\idlelib\config.py", line 766, in <module>
idleConf = IdleConf()
File "C:\Users\Habib\AppData\Local\Programs\Python\Python39\lib\idlelib\config.py", line 166, in __init__
self.LoadCfgFiles()
File "C:\Users\Habib\AppData\Local\Programs\Python\Python39\lib\idlelib\config.py", line 758, in LoadCfgFiles
self.userCfg[key].Load() #same keys
File "C:\Users\Habib\AppData\Local\Programs\Python\Python39\lib\idlelib\config.py", line 77, in Load
self.read(self.file)
File "C:\Users\Habib\AppData\Local\Programs\Python\Python39\lib\configparser.py", line 697, in read
self._read(fp, filename)
File "C:\Users\Habib\AppData\Local\Programs\Python\Python39\lib\configparser.py", line 1082, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
configparser.MissingSectionHeaderError: File contains no section headers.
file: 'C:\\Users\\Habib\\.idlerc\\config-main.cfg', line: 1
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Python 3.9 is very new and it may not be working with your system try switching back to python 3.8.6 and it looks like you havent added python to path
I had the same problem and I was trying to open (pythonw.exe)
it turns out that I had to open Python\Lib\idlelib\idle.py type(python file(no console))

tensorflow.python.framework.errors_impl.NotFoundError: data/kitti_label_map.pbtxt; No such file or directory

I'm trying to convert the kitti dataset into the tensorflow .record. After I typed the command:
python object_detection/dataset_tools/create_kitti_tf_record.py
--lable_map_path=object_detection/data/kitti_label_map.pbtxt --data_dir=/Users/zhenglyu/Graduate/research/DataSet/kitti/data_object_image_2/testing/image_2
--output_path=/Users/zhenglyu/Graduate/research/DataSet/kitti2tf/train.record
validation_set_size=1000
I got this error:
Traceback (most recent call last): File
"object_detection/dataset_tools/create_kitti_tf_record.py", line 310,
in
tf.app.run() File "/Users/zhenglyu/tensorflow/lib/python3.6/site-packages/tensorflow/python/platform/app.py",
line 126, in run
_sys.exit(main(argv)) File "object_detection/dataset_tools/create_kitti_tf_record.py", line 307,
in main
validation_set_size=FLAGS.validation_set_size) File "object_detection/dataset_tools/create_kitti_tf_record.py", line 94,
in convert_kitti_to_tfrecords
label_map_dict = label_map_util.get_label_map_dict(label_map_path) File
"/Users/zhenglyu/Graduate/research/TensorFlow/model/research/object_detection/utils/label_map_util.py",
line 152, in get_label_map_dict
label_map = load_labelmap(label_map_path) File "/Users/zhenglyu/Graduate/research/TensorFlow/model/research/object_detection/utils/label_map_util.py",
line 132, in load_labelmap
label_map_string = fid.read() File "/Users/zhenglyu/tensorflow/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py",
line 120, in read
self._preread_check() File "/Users/zhenglyu/tensorflow/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py",
line 80, in _preread_check
compat.as_bytes(self.name), 1024 * 512, status) File "/Users/zhenglyu/tensorflow/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py",
line 519, in __exit
c_api.TF_GetCode(self.status.status)) tensorflow.python.framework.errors_impl.NotFoundError:
data/kitti_label_map.pbtxt; No such file or directory
The file exists for sure. And I don't know why as I set the label_map_path to another one (object_detection/data/kitti_label_map.pbtxt), the path still remains the default setting (data/kitti_label_map.pbtxt).
I know there's a lot of related problem but none of the solutions that I found works for me. I used Virtualenv to install the tensorflow and using python 3.6. Could these be the problem? Thanks!
I don't have a definitive solution to this but here is what resolved it.
First, I copied the kitti_label_map.pbtxt into the data_dir. Then I also copied create_kitti_tf_record.py into the data_dir. And now I copied(this is what made it run in the end) the name and absolute path of the kitti_label_map.pbtxt and pasted it as label_map_path
I have no idea why but it worked.

Categories

Resources