Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help my code won't run #21906

Closed
beatriceSin opened this issue Mar 18, 2024 · 3 comments
Closed

Help my code won't run #21906

beatriceSin opened this issue Mar 18, 2024 · 3 comments

Comments

@beatriceSin
Copy link

I have checked my csv file and it has been read before why do I keep getting this error.

File /Applications/Spyder.app/Contents/Resources/lib/python3.9/spyder_kernels/py3compat.py:356 in compat_exec
exec(code, globals, locals)

File ~/Documents/FYP File/FYP Data Python/Anomaly Detection .py:4
from scipy.spatial.distance import cdist

File /Applications/Spyder.app/Contents/Resources/lib/python3.9/scipy/init.py:67
from scipy._lib import _pep440

File /Applications/Spyder.app/Contents/Resources/lib/python3.9/scipy/_lib/init.py:12
from scipy._lib._testutils import PytestTester

File /Applications/Spyder.app/Contents/Resources/lib/python3.9/scipy/_lib/_testutils.py:21
_tags = list(sys_tags())

File packaging/tags.pyc:561 in sys_tags

File packaging/tags.pyc:227 in cpython_tags

File packaging/tags.pyc:418 in mac_platforms

File subprocess.pyc:528 in run

CalledProcessError: Command '['/Applications/Spyder.app/Contents/MacOS/python', '-sS', '-c', 'import platform; print(platform.mac_ver()[0])']' returned non-zero exit status 1.

Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = '/Applications/Spyder.app/Contents/MacOS/python'
isolated = 0
environment = 1
user site = 0
import site = 0
sys._base_executable = '/Applications/Spyder.app/Contents/MacOS/python'
sys.base_prefix = '/Users/runner/hostedtoolcache/Python/3.9.14/x64'
sys.base_exec_prefix = '/Users/runner/hostedtoolcache/Python/3.9.14/x64'
sys.platlibdir = 'lib'
sys.executable = '/Applications/Spyder.app/Contents/MacOS/python'
sys.prefix = '/Users/runner/hostedtoolcache/Python/3.9.14/x64'
sys.exec_prefix = '/Users/runner/hostedtoolcache/Python/3.9.14/x64'
sys.path = [
'/Users/runner/hostedtoolcache/Python/3.9.14/x64/lib/python39.zip',
'/Users/runner/hostedtoolcache/Python/3.9.14/x64/lib/python3.9',
'/Users/runner/hostedtoolcache/Python/3.9.14/x64/lib/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007ff8584f4340 (most recent call first):

@ccordoba12
Copy link
Member

Hey @beatriceSin, thanks for reporting. I have a couple of questions for you:

  • Do you have an M1 or Intel Mac?
  • Did you use the right Spyder installer for your architecture?

@beatriceSin
Copy link
Author

hello sorry for the late response my issue has been resolved, it was because i did not have spyder on my conda enivronment thank you

@ccordoba12
Copy link
Member

Ok, thanks for letting us know about it. And glad to know you're able to use Spyder without issues again.

@ccordoba12 ccordoba12 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants