-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
Install Docker Compose using Pip not working #299
Comments
Your error message indicates that the rust compiler is missing. Install it with: |
okay i will give that try now |
it installed what and i run it agein and got this =============================DEBUG ASSISTANCE=============================\n If you are seeing a compilation error please try the following steps to\n successfully install cryptography:\n 1) Upgrade to the latest pip and try again. This will fix errors for most\n users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip\n 2) Read https://cryptography.io/en/latest/installation/ for specific\n instructions for your platform.\n 3) Check our frequently asked questions for more information:\n https://cryptography.io/en/latest/faq/\n 4) Ensure you have a recent Rust toolchain installed:\n https://cryptography.io/en/latest/installation/#rust\n \n Python: 3.10.0\n platform: Linux-5.10.63-v7l+-armv7l-with-glibc2.28\n pip: n/a\n setuptools: 60.9.3\n setuptools_rust: 1.1.2\n =============================DEBUG ASSISTANCE=============================\n \n error: can't find Rust compiler\n \n If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.\n \n To update pip, run:\n \n pip install --upgrade pip\n \n and then retry package installation.\n \n If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.\n \n This package requires Rust >=1.41.0.\n ----------------------------------------\n ERROR: Failed building wheel for cryptography\nERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly\nWARNING: You are using pip version 21.2.3; however, version 22.0.3 is available.\nYou should consider upgrading via the '/usr/local/bin/python3.10 -m pip install --upgrade pip' command.\n"} PLAY RECAP ********************************************************************************** if neeed more let me know |
You might need to restart your shell though. Have you logged out and in? Or you might just need to add it to your PATH variable. The rust compiler should be in ~/.cargo/bin |
If that doesn't help, then maybe try to install docker-compose this way: You need to have some development libraries installed. As described in the link above. |
i get to 'sudo pip3 install docker-compose' and i get this =============================DEBUG ASSISTANCE============================= error: can't find Rust compiler If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler. To update pip, run:
and then retry package installation. If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain. This package requires Rust >=1.41.0.ERROR: Failed building wheel for cryptography and i run ''pip install --upgrade pip'' so i don't what wrong |
Right, in that case you need the rust compiler for all users. I think you might have installed it only for the user. Best to deinstall the rust compiler for your user with: And then install it with: That way it should be available when you do: |
Hang on, I think you can also just install docker-compose via apt: Maybe just try that. |
well at the moment im at |
okay this is what i get now i think we getting close and thank for your help so far TASK [Ensure internet-monitoring environment is running.] ********************************** RUNNING HANDLER [Restart internet-monitoring] ********************************************** PLAY RECAP ********************************************************************************* |
Great, looks like you breezed past your initial problem. Now you only seem to need additional packages, like the docker sdk. However, I haven't had these many problems when following the install instructions. |
python3 --version python --version |
and what do you mean by docker sdk |
If you're using Python 3.10 then your current problem is something else. You are too cutting edge with your version. I think the easiest for you is to just do the install steps within a virtual python environment, for example within the internet-pi folder: Start with the pip3 install ansible step and work your way through. |
okay i will give it a try |
Or try to upgrade your python 3.10 to a more recent version. Some people report that this problem doesn't exist with 3.10.2. |
okay i will give that a try becouse i just run python3 -m virtualenv --python=[/usr/lib/python3.7] ansible but it was a pain to get python 3.10 on and working |
Tbh, it's usually not worth the pain to be on the latest version. I think 3.8 or 3.9 should be absolutely fine for most use cases. And in case you want to go down the line of the virtualenv in the future, you would need to remove the brackets around the python: Good luck and have fun! |
i got python -V Python 3.8.12 installed but still get the same error as before and then i try virtualenv i get python -m virtualenv --python=/usr/bin/python3.8 ansible |
Pip3 install virtualenv but before you go down that route make sure you understand what virtualenv is: |
okay but i just tryed agen and got this error and it looks difrent TASK [Ensure internet-monitoring environment is running.] **************************************** PLAY RECAP *************************************************************************************** |
and i just try to install virtualenv |
Right, think my advice with virtualenv is not correct. Ansible will connect to your local host / host and probably use the system installed Python anyway. And your problem is still your Python 3.10 install with it’s breaking change in the collections package. (See the collections.abc comment above) Probably best to use stackoverflow from here and search for a solution or you just need to wait until this has been addressed by Python updates. Your problem is with your system environment and not an issue with internet-pi. The only two options I see as feasible for your level of Python knowledge is:
|
Or just follow what the error message tells you: install docker with |
well i already have docker install and running this second and im looking to change my Python3 becouse when i try bur for sudo update-alternatives --config python Selection Path Priority Status0 /usr/local/bin/python3.10 2 auto mode
Press to keep the current choice[*], or type selection number: |
You mentioned above that you have installed python 3.8 already. I assume that you’re talking about your host 192.168.1.133? As a work around you could just link your Python3 in /usr/bin to 3.8.
Try the internet-pi install then. After successful doing this, change it back to 3.10, so you don’t break any other installs? |
i only put 3.10 for this and this is the new error after doing both commands TASK [Ensure apt cache is up to date.] ********************************************************** PLAY RECAP ************************************************************************************** |
Well, I recommended the work around so you would use Python 3.8 instead of 3.10. Just relink /use/bin/python3 to /usr/bin/python3.10 and google your error message. Take it from there. Because at the moment your problem is using a Python version that is too new and therefore introducing some additional problems. It’s always the risk of being too fast on recent Python versions, because you will have some packages breaking due to hard API changes at major releases. |
Very weird, I tested the install on a Debian 10 virtual machine with only Python 3.10.0 and I had absolutely no problem. However, there might be another more simple way to help you out. Or if you replaced your Python 3.7 with 3.8 now, then this should be I think that theoretically should avoid that ansible is using python3.10 on the host machine. |
Right, so how did your inventory.ini look before you made the change? |
what it was 0[internet_pi] Comment out the previous line and uncomment this to run inside Raspberry Pi.192.168.1.133 ansible_connection=local ansible_user=pi what it is at the moment 0[internet_pi] Comment out the previous line and uncomment this to run inside Raspberry Pi.192.168.1.133 ansible_connection=local ansible_user=pi ansible_python_interpreter=/usr/bin/python3.8 |
I think you accidentally added a 0 in front of [internet_pi]. That's the reason your inventory.ini can't be parsed. |
okay well i have trid with and without the 0 and it hass been here a while but not braking it like now so somthing we are going make that a problem/fixed but i now get that long error but i have ''ansible_python_interpreter=/usr/bin/python3.8'' in the inventory.ini TASK [Install Docker Compose using Pip.] *************************************************** PLAY RECAP ********************************************************************************* |
It looks like your host still uses pip3 from Python 3.10. What do you get when you enter |
pip3 --version |
Could you do the following?
Then again: |
yes python3.8 but then i run ''python3.8 -m pip install pip'' Defaulting to user installation because normal site-packages is not writeable |
You might also just need to perform the following: |
nope run ''sudo apt-get install --reinstall lsb_release'' then ''python3.8 -m pip install pip'' i get the same error |
What is the first line of: |
#!/usr/bin/python3 -Es (Depending on what you mean by first line ie first line of all or first line that's not crossed out) |
The problem might be too many different python installs now and we are jumping from one problem to another. Do you have anything important on your Raspberry Pi? |
yes i do my minecraft server and my docker of home-assistant |
i do have a Speedtest. net integrations on home-assistant but the graf but only show the past 24h ( i wnat the Internet Pi is becuse my isp reports one thing but my pc and rp4 show difrent and i can see and feel on the internet my pc and rp4 are corret) and i don't need Python 3.10 at all. all i run is docker and java (minecraft server) |
Ok, I see. Here are some pointers for your current problem: If you want to solve this in an easier way and you're not reliant on either 3.10 or 3.8 , I would deinstall these for now (https://stackoverflow.com/questions/48899604/how-to-uninstall-python-in-ubuntu-completely-and-reinstalling-it). |
okay i will get to backing up my rp4 and work out what parts i need from
|
i backed up my rp4 last night and now run for 3.7 3.8 3.10 but there are are still instaled but i tryed sudo apt-get reinstall python3 python3-pip and now i have new backgrond and some stuff looks difrent too and i have tryed but all pythons there |
Not sure I understand what exactly you're asking. As a rule of thumb, I would not touch the normal Python system install. For example for Raspbian, I'd leave it on the Python version that is installed with apt. Every time I develop or test something, I use a virtual environment. And I personally prefer Anaconda. Much better, then having several Python versions installed natively on your distro. |
okay i will try that andi was trying to remove Python versions |
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution! Please read this blog post to see the reasons why I mark issues as stale. |
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details. |
I did a fresh install of Raspberry Pi OS and followed the steps in the README. I encountered this same issue on the docker compose installation ansible step and was able to remedy it by doing the following. I'm thinking it's probably related to using Raspberry Pi OS instead of debian.
hope this helps if anyone else runs into this! |
This issue is no longer marked for closure. |
Marking as a bug, sorry I haven't gotten around to looking into this with a fresh install yet. |
I can confirm that manually installing the docker-compose does in-fact solve the issue. :) |
Confirming the same here: manually installing docker-compose solved this issue for me. |
it gets stuck on this and then
=============================DEBUG ASSISTANCE=============================\n If you are seeing a compilation error please try the following steps to\n successfully install cryptography:\n 1) Upgrade to the latest pip and try again. This will fix errors for most\n users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip\n 2) Read https://cryptography.io/en/latest/installation/ for specific\n instructions for your platform.\n 3) Check our frequently asked questions for more information:\n https://cryptography.io/en/latest/faq/\n 4) Ensure you have a recent Rust toolchain installed:\n https://cryptography.io/en/latest/installation/#rust\n \n Python: 3.10.0\n platform: Linux-5.10.63-v7l+-armv7l-with-glibc2.28\n pip: n/a\n setuptools: 60.0.3\n setuptools_rust: 1.1.2\n =============================DEBUG ASSISTANCE=============================\n \n error: can't find Rust compiler\n \n If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.\n \n To update pip, run:\n \n pip install --upgrade pip\n \n and then retry package installation.\n \n If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.\n \n This package requires Rust >=1.41.0.\n ----------------------------------------\n ERROR: Failed building wheel for cryptography\nERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly\nWARNING: You are using pip version 21.2.3; however, version 21.3.1 is available.\nYou should consider upgrading via the '/usr/local/bin/python3.10 -m pip install --upgrade pip' command.\n"}
PLAY RECAP ****************************************************************************************
192.168.1.133 : ok=6 changed=0 unreachable=0 failed=1 skipped=4 rescued=0 ignored=0
i have been trying to work on DEBUG and when i put
pip install --upgrade pip
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pip in ./.local/lib/python3.10/site-packages (21.3.1)
and python version
python --version
Python 3.7.3
python3 --version
Python 3.10.0
can somone help please and thanks in advance
The text was updated successfully, but these errors were encountered: