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

MAC ipykernel包安装 #11

Open
100sweet opened this issue Sep 24, 2024 · 17 comments
Open

MAC ipykernel包安装 #11

100sweet opened this issue Sep 24, 2024 · 17 comments
Labels
question Further information is requested

Comments

@100sweet
Copy link

/opt/homebrew/bin/python3 -m pip install ipykernel -U --user --force-reinstall

@Tenth-crew
Copy link
Collaborator

有截图吗,这个信息不够全面

@100sweet
Copy link
Author

<img width="1023" alt="截屏2024-09-24 15 17 46" src="https://github.com/user-attachments/assets/f13f562b-1e
截屏2024-09-24 15 18 19
36-46f0-896d-66880c60c969">

@100sweet
Copy link
Author

截屏2024-09-24 15 18 40

@100sweet
Copy link
Author

截屏2024-09-24 15 20 48

@Tenth-crew
Copy link
Collaborator

Tenth-crew commented Sep 24, 2024

你似乎是在自己创建的虚拟环境下运行的这些命令。尝试在基础环境中运行命令pip install jupyter。你可能需要先进入基础环境,常见的方法是重新开启一个终端。但我不了解MAC系统,你可以尝试一下这个方法

@Frank-whw
Copy link

我输入Pip install ipykernel,报错ValueError: check_hostname requires server_hostname
image

@HalloMelon HalloMelon added the question Further information is requested label Sep 24, 2024
@Tenth-crew
Copy link
Collaborator

ValueError: check_hostname requires server_hostname

开着梯子的话把梯子关了试试

@100sweet
Copy link
Author

截屏2024-09-24 15 31 16

@100sweet
Copy link
Author

我新开了很多次终端了,不太行哎

@Tenth-crew
Copy link
Collaborator

我晚些时候回复你

@100sweet
Copy link
Author

截屏2024-09-24 15 33 56 重新开终端是这样的

@100sweet
Copy link
Author

好的 谢谢老师

@Tenth-crew
Copy link
Collaborator

如果你使用pycharm可以的话那就用pycharm,没关系的,能完成任务都可以

@Tenth-crew
Copy link
Collaborator

同学,你可以尝试一下该链接中的方法,由于助教使用的是windows11,所以无法亲自实验,使用MAC不得不自己面对更多的问题https://www.cnblogs.com/noemie223/p/18054437

@Tenth-crew Tenth-crew changed the title ipykernel包安装 MAC ipykernel包安装 Sep 24, 2024
@Tenth-crew
Copy link
Collaborator

下面我提供一个解决思路,因为我发现同学你使用的是虚拟环境,你可以参考解决思路。原链接:https://stackoverflow.com/questions/77604621/run-the-following-command-to-install-ipykernel-into-the-python-environment

  1. 首先通过python3 -m pip list命令检查自己是否安装了ipykernel这个包
  2. 如果存在这个包,你需要检查自己的jupyter运行的python内核是在哪个python环境下,确保jupyter运行的内核已经有了ipykernel这个包
  3. 如果不存在这个包,在jupyter运行的环境中使用python3 -m pip install ipykernel命令来安装这个包
    所以比较重要的是,确认自己jupyter运行的环境。

@100sweet
Copy link
Author

好的,谢谢老师!我已经解决了

@Tenth-crew
Copy link
Collaborator

请问同学你具体的解决方式是什么,可以总结一下方便其他同学参考学习

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants