简体   繁体   English

在 Mac 上找不到 Python 3 文件夹?

[英]Can't find Python 3 folder on Mac?

I'm unable to find the python 3 folder on my Mac (Mojave).我在 Mac (Mojave) 上找不到 python 3 文件夹。 I have installed it correctly, and I've tried to reinstall it with but it says that it is already installed.我已经正确安装了它,我已经尝试重新安装它,但它说它已经安装了。 I even installed a package (Mendel-development-tool) on it.我什至在上面安装了一个包(Mendel-development-tool)。 Through my checking of the Mendel-development-tool (trying to uninstall it), it states that I have a folder with this:通过我对 Mendel-development-tool 的检查(尝试卸载它),它指出我有一个包含以下内容的文件夹:

/Users/username/Library/Python/3.7/bin/mdt

But, when I enter this path into my terminal, it shows python 2.7.但是,当我将此路径输入终端时,它显示 python 2.7。 And, when I look through to the site packages, mdt isn't there, and when I look through my library folder and see python, the only thing there is 2.7.而且,当我查看站点包时,mdt 不存在,而当我查看我的库文件夹并看到 python 时,只有 2.7。

Does anyone know a fix to this?有谁知道解决这个问题?

It's not clear how you installed python, but it could literally be installed anywhere on disk不清楚你是如何安装 python 的,但它实际上可以安装在磁盘上的任何地方

If you want to find something use the find command如果您想查找某些内容,请使用find命令

sudo find ~ -type f -name mdt

If that returns nothing, then mdt is not in your home folder如果没有返回任何内容,则 mdt 不在您的主文件夹中

You can also find all directories with Python in the name您还可以找到名称中带有 Python 的所有目录

sudo find ~ -type d -iname '*python*' 

There may not be a python3 folder.可能没有 python3 文件夹。 What you probably want is the python3 application.您可能想要的是 python3 应用程序。 Type类型

which python3哪个python3

and see what you get.看看你得到了什么。 In my case, I get the location of the python3 application.就我而言,我得到了 python3 应用程序的位置。 I also have the application python3.7.我也有应用程序python3.7。 Once you find the location of these apps you can make sure the location is in your PATH.找到这些应用程序的位置后,您可以确保该位置在您的 PATH 中。

Installing a python version does not create a python folder.安装 python 版本不会创建 python 文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM