Pip install error #189
-
|
I was trying to install a PyRosetta net in my Ubuntu on Windows 11 box, and I was using these two commands: I got the same error for both: × This environment is externally managed note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. Can anybody tell me how to fix this? I ran the command "sudo apt install python3 python3-pip ipython3, and it seems I already have the latest Python version installed. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
You're using the system python. Due to "dependency hell" (technical term), certain distributions like Debian & Ubuntu turn off pip for the system python. The issue is that installing arbitrary packages can cause other packages to update/change version, which may potentially break the python scripts which are used by the OS. To prevent that, the distributions carefully control which packages/versions can be installed in the system python and do so by turning off pip and requiring you to install python packages for the system python through the distribution's standard package manager (e.g. The issue you run into is that neither Ubuntu nor Debian really have an The recommended way to do that would be to install Conda. Conda creates a Python installation in your home directory, and provides a way to easily switch between different python environments. I recommend Conda because it's the current de facto way of installing many of the biochemistry-related packages in Python. (e.g. most of the ML packages have Conda install instructions). -- As an added benefit, there's a RosettaCommons Conda channel where you can install PyRosetta through Conda directly (see the PyRosetta downloads page for more). |
Beta Was this translation helpful? Give feedback.
-
|
I would voice somewhat different perspective on this: using Conda while convenient for simple projects frequently lead to rather heavy installs with a lot of unnecessary dependencies for complex projects. In particular, when installing PyRosetta from Conda using Python-3.9 or lower that install alone will pull ~1GB of other packages that you might not necessary need. So in some cases it might be best to keep things simple and go with creating Python virtual environment. And if you have to stick with Conda then i would recommend to use Python-3.10 or later. What approach will work for particular case will be project dependent so just keep an open mind on this and see what works. |
Beta Was this translation helpful? Give feedback.
You're using the system python. Due to "dependency hell" (technical term), certain distributions like Debian & Ubuntu turn off pip for the system python. The issue is that installing arbitrary packages can cause other packages to update/change version, which may potentially break the python scripts which are used by the OS. To prevent that, the distributions carefully control which packages/versions can be installed in the system python and do so by turning off pip and requiring you to install python packages for the system python through the distribution's standard package manager (e.g.
apt).The issue you run into is that neither Ubuntu nor Debian really have an
apt installable PyRosett…