我在我与指挥部的手法中建立了虚拟星号:
conda create -p mlenv python==3.12 -y
启动我的环境,然后建立起来。 档案和增加2条线如下:
from setuptools import find_packages,setup
from typing import List
• 立即尝试将它推向如下错误:
(/Volumes/Rooby/Training/end_to_end_ML/mlenv) Rooby@ Rooby-MacBook-Pro-2 end_to_end_ML % pip install --upgrade pip
Traceback (most recent call last):
File "/Volumes/Rooby/Training/end_to_end_ML/mlenv/bin/pip", line 7, in <module>
from pip._internal.cli.main import main
File "/Volumes/Rooby/Training/end_to_end_ML/mlenv/lib/python3.12/site-packages/pip/__init__.py", line 1, in <module>
from typing import List, Optional
ModuleNotFoundError: No module named typing
我按照有人的建议对指挥进行了审判:安装——安装——安装——仍在犯同样的错误:
请建议。
After checking pip --version.
getting the same error:
(base) Robby@Robby-MacBook-Pro-2 end_to_end_ML % conda env list
# conda environments:
#
base * /Users/Robby/anaconda3
/Volumes/Robby/Training/end_to_end_ML/mlenv
(base) Robby@Robby-MacBook-Pro-2 end_to_end_ML % conda activate /Volumes/Robby/Training/end_to_end_ML/mlenv
(/Volumes/Robby/Training/end_to_end_ML/mlenv) Robby@Robby-MacBook-Pro-2 end_to_end_ML % pip --version
Traceback (most recent call last):
File "/Volumes/Robby/Training/end_to_end_ML/mlenv/bin/pip", line 7, in <module>
from pip._internal.cli.main import main
File "/Volumes/Robby/Training/end_to_end_ML/mlenv/lib/python3.12/site- packages/pip/__init__.py", line 1, in <module>
from typing import List, Optional
ModuleNotFoundError: No module named typing
(/Volumes/Robby/Training/end_to_end_ML/mlenv) Robby@Robby- MacBook-Pro-2 end_to_end_ML %