Spyder latest version - anaconda

Did any one face this issue while downloading the latest Anaconda3 and opened spyder?
An error ocurred while starting the kernel
The error is:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder\plugins\ipythonconsole\plugin.py", line 1173, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle, **kwargs)
File "C:\Users\user\AppData\Roaming\Python\Python37\site‑packages\jupyter_client\manager.py", line 301, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "C:\Users\user\AppData\Roaming\Python\Python37\site‑packages\jupyter_client\manager.py", line 248, in pre_start_kernel
self.write_connection_file()
File "C:\Users\user\AppData\Roaming\Python\Python37\site‑packages\jupyter_client\connect.py", line 474, in write_connection_file
kernel_name=self.kernel_name
File "C:\Users\user\AppData\Roaming\Python\Python37\site‑packages\jupyter_client\connect.py", line 138, in write_connection_file
with secure_write(fname) as f:
File "C:\ProgramData\Anaconda3\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "C:\Users\user\AppData\Roaming\Python\Python37\site‑packages\jupyter_core\paths.py", line 435, in secure_write
win32_restrict_file_to_user(fname)
File "C:\Users\user\AppData\Roaming\Python\Python37\site‑packages\jupyter_core\paths.py", line 361, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed: %1 is not a valid Win32 application.
Any help will be appreciated !!

Related

pip install command creates syntax error : Traceback (most recent call last)

I've been trying to install bs4 and selenium from the windows powershell, and here is the error message I get :
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\cli\base_command.py", line 160, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\cli\req_command.py", line 247, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\commands\install.py", line 326, in run
session = self.get_default_session(options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\cli\req_command.py", line 98, in get_default_session
self._session = self.enter_context(self._build_session(options))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\cli\req_command.py", line 125, in _build_session
session = PipSession(
^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\network\session.py", line 343, in __init__
self.headers["User-Agent"] = user_agent()
^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\network\session.py", line 175, in user_agent
setuptools_dist = get_default_environment().get_distribution("setuptools")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 188, in get_distribution
return next(matches, None)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 183, in <genexpr>
matches = (
^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\metadata\base.py", line 612, in iter_all_distributions
for dist in self._iter_distributions():
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 176, in _iter_distributions
for dist in finder.find_eggs(location):
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 146, in find_eggs
yield from self._find_eggs_in_zip(location)
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 123, in _find_eggs_in_zip
from pip._vendor.pkg_resources import find_eggs_in_zip
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3251, in <module>
#_call_aside
^^^^^^^^^^^
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3235, in _call_aside
f(*args, **kwargs)
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3277, in _initialize_master_working_set
tuple(
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3278, in <genexpr>
dist.activate(replace=False)
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2785, in activate
declare_namespace(pkg)
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2284, in declare_namespace
_handle_ns(packageName, path_item)
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2217, in _handle_ns
loader.load_module(packageName)
File "C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pygoogle\google.py", line 113
print """PyGoogle %(__version__)s
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
I cannot install any pip package in my pc it returns that error
pip version is : pip 22.3.1
python version is : Python 3.11.1
Appreciate Your support .
I tried to install any pip package
You've installed a package PyGoogle which is very old (2006) and works only with Python 2. You need to uninstall it:
pip uninstall -y pygoogle
If that doesn't work — remove the directory C:\Users\T470\AppData\Local\Programs\Python\Python311\Lib\site-packages\pygoogle

ren'py missing game/android.rpy how to fix?

I just wanted to export a project for android and here is this error.
How to fix this problem?
error code:
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/android.rpy", line 507, in <module>
File "game/mobilebuild.rpy", line 204, in call
TypeError: a bytes-like object is required, not 'str'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "launcher/game/android.rpyc", line 505, in script
File "C:\renpy-8.0.0-sdk\renpy\ast.py", line 1111, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\renpy-8.0.0-sdk\renpy\python.py", line 1049, in py_exec_bytecode
exec(bytecode, globals, locals)
File "game/android.rpy", line 507, in <module>
File "C:\renpy-8.0.0-sdk\rapt\buildlib\rapt\install_sdk.py", line 356, in install_sdk
check_java(interface)
File "C:\renpy-8.0.0-sdk\rapt\buildlib\rapt\install_sdk.py", line 52, in check_java
if not run_slow(interface, plat.javac, plat.path("buildlib/CheckJDK8.java"), use_path=True):
File "C:\renpy-8.0.0-sdk\rapt\buildlib\rapt\install_sdk.py", line 37, in run_slow
interface.call(args, cancel=True, **kwargs)
File "game/mobilebuild.rpy", line 204, in call
File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/traceback.py", line 163, in print_exc
File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/traceback.py", line 105, in print_exception
TypeError: a bytes-like object is required, not 'str'
Windows-10-10.0.18363 AMD64
Ren'Py 8.0.0.22062402
Ren'Py Launcher 8.0.0.22062402
Fri Jul 1 02:39:10 2022

conda 4.7.12: conda update -n base conda fails

I am working with conda version 4.7.12. Running the command conda update -n base conda failed. I am getting the same result when trying to update other environments as well, but the problem seemed to start when this command failed the first time. The output is:
$ conda update -n base conda
Collecting package metadata (current_repodata.json): failed
WARNING conda.exceptions:print_unexpected_error_report(1208): KeyError(u'pkgs_dirs',)
Traceback (most recent call last):
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/exceptions.py", line 1206, in print_unexpected_error_report
message_builder.append(get_main_info_str(error_report['conda_info']))
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/cli/main_info.py", line 236, in get_main_info_str
info_dict['_' + key] = ('\n' + 26 * ' ').join(info_dict[key])
KeyError: u'pkgs_dirs'
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/exceptions.py", line 1074, in __call__
return func(*args, **kwargs)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/cli/main_update.py", line 20, in execute
install(args, parser, 'update')
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/cli/install.py", line 265, in install
should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/solve.py", line 117, in solve_for_transaction
should_retry_solve)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/solve.py", line 158, in solve_for_diff
force_remove, should_retry_solve)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/solve.py", line 262, in solve_final_state
ssc = self._collect_all_metadata(ssc)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/common/io.py", line 88, in decorated
return f(*args, **kwds)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/solve.py", line 415, in _collect_all_metadata
index, r = self._prepare(prepared_specs)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/solve.py", line 1004, in _prepare
self.subdirs, prepared_specs, self._repodata_fn)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/index.py", line 250, in get_reduced_index
_supplement_index_with_system(reduced_index)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/core/index.py", line 155, in _supplement_index_with_system
cuda_version = context.cuda_version
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/_vendor/auxlib/decorators.py", line 268, in new_fget
cache[inner_attname] = func(self)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/common/decorators.py", line 20, in wrapper
return func(*args, **kwargs)
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/base/context.py", line 770, in cuda_version
return cuda_detect()
File "/home/XXXXXX/miniconda/lib/python2.7/site-packages/conda/common/cuda.py", line 19, in cuda_detect
system = platform.system()
AttributeError: 'module' object has no attribute 'system'
`$ /home/XXXXXX/miniconda/bin/conda update -n base conda`
environment variables:
conda info could not be constructed.
KeyError(u'pkgs_dirs',)
An unexpected error has occurred. Conda has prepared the above report.

Python 3.4 pyximport error

I have two files named as experiment.py and low_dim_cython.pyx. I am using python 3.4 in PyCharm. In experiment.py, I tried to import low_dim_cython.pyx as:
import numpy
import pyximport
pyximport.install(pyximport.install(setup_args={'include_dirs':[numpy.get_include()]}))
import low_dim_cython
It throws these errors given below.
Traceback (most recent call last):
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\site-packages\pyximport\pyximport.py", line 216, in load_module
inplace=build_inplace, language_level=language_level)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\site-packages\pyximport\pyximport.py", line 192, in build_module
reload_support=pyxargs.reload_support)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\site-packages\pyximport\pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\site-packages\Cython\Distutils\old_build_ext.py", line 185, in run
_build_ext.build_ext.run(self)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\site-packages\Cython\Distutils\old_build_ext.py", line 193, in build_extensions
self.build_extension(ext)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\command\build_ext.py", line 503, in build_extension
depends=ext.depends)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\AppData\Local\Continuum\Anaconda3\envs\priview3.4\lib\distutils\msvc9compiler.py", line 259, in query_vcvarsall
raise DistutilsPlatformError("Unable to find vcvarsall.bat")
distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat

Failed to pip install georasters in MacOSX

It always failed to pip install georasters in my macbook.
The following is the Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 324, in run
requirement_set.prepare_files(finder)
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 634, in _prepare_file
abstract_dist.prep_for_dist()
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 412, in run_egg_info
self.setup_py, self.name,
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 387, in setup_py
import setuptools # noqa
File "build/bdist.macosx-10.12-intel/egg/setuptools/__init__.py", line 12, in <module>
File "build/bdist.macosx-10.12-intel/egg/setuptools/version.py", line 1, in <module>
File "build/bdist.macosx-10.12-intel/egg/pkg_resources/__init__.py", line 72, in <module>
File "build/bdist.macosx-10.12-intel/egg/packaging/requirements.py", line 59, in <module>
TypeError: __call__() takes exactly 2 arguments (1 given)
pip --version:
pip 9.0.1 from /Library/Python/2.7/site-packages (python 2.7)
After many times trying, I resolved the problem.
I used the command:pip install --no-deps georasters
https://pip.pypa.io/en/stable/reference/pip_install/#installation-order[enter image description here][1]

Resources