简体   繁体   English

搞乱了Python包的安装? (OS X)

[英]Messed up Python packages installement? (OS X)

I think i somehow messed up installing packages for python and the whole environment. 我想我以某种方式搞砸了为python和整个环境安装软件包。 Whenever i want to install something i run into problems like: 每当我想安装某些东西时,我都会遇到类似问题:

directory is not owned by the current user and the cache has been disabled

Also PyCharm thinks i still need to install referenced packages (no modules. Which is wrong since i can use them. When i click on 'install referenced packages' i get the mentioned warning from above plus: 另外,PyCharm认为我仍然需要安装引用的软件包(没有模块。这是错误的,因为我可以使用它们。当我单击“安装引用的软件包”时,我从上面得到警告信息:

OSError: [Errno 1] Operation not permitted

Hopefully one of you can help! 希望你们中的一员能提供帮助! :( :(

Best regards Matthias 最好的问候马蒂亚斯

Edit: At some point i also installed a venv for python. 编辑:有时我还为python安装了venv。 Maybe this relates to my problem. 也许这与我的问题有关。 I'm rly sorry i am new to it and have no idea what i'm doing. 很抱歉,我是新来的,不知道我在做什么。

You have an issue with your permissions, if you run 如果您运行,则权限有问题

which python

you will see where your current version of python is installed. 您将看到您当前版本的python的安装位置。 If you're on osx, I seriously recommend downloading brew here: https://brew.sh/ . 如果您使用的是osx,我强烈建议您在此处下载brew: https : //brew.sh/ Just paste that command into your terminal, then you should install python by running: 只需将该命令粘贴到您的终端中,然后应该通过运行以下命令安装python:

brew install python

This will give you some later instructions, but the brew bundled version of python is alot more robust than the one that gets bundled with your system. 这将为您提供一些后续说明,但是python的brew捆绑版本比与您的系统捆绑的版本更强大。 Another note is that if you're using virtual environments, consider using virtualenvwrapper here . 另一个注意事项是,如果您使用的是虚拟环境,请考虑在此处使用virtualenvwrapper。 This should make things run alot more smoothly for you :) 这应该使事情运行起来更加顺畅:)

Hope that helps. 希望能有所帮助。

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

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