Error occurs when trying to install mega.py using pip - python

I was trying to install mega.py, for a project I'm working on that needs the files to be uploaded to the Mega Cloud Server, using the command pip install mega.py and the following is shown in the cmd.
Collecting mega.py
Using cached mega.py-1.0.8-py2.py3-none-any.whl (19 kB)
Collecting pycryptodome<4.0.0,>=3.9.6
Using cached pycryptodome-3.14.1-cp35-abi3-win_amd64.whl (1.8 MB)
Collecting tenacity<6.0.0,>=5.1.5
Using cached tenacity-5.1.5-py2.py3-none-any.whl (34 kB)
Collecting pathlib==1.0.1
Using cached pathlib-1.0.1.tar.gz (49 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Can anyone help me out in figuring out what I should do to resolve this? I've been trying out solutions for this problem for a long time now!

Related

"ERROR: Could not find a version that satisfies the requirement kivy_deps.sdl2_dev~=0.4.5 (from versions: 0.5.1)" shows up trying to install kivy

When I try to install Kivy on Python it all runs fine at first, before the message in the title shows up.
C:\Users\finnj>pip install kivy
Collecting kivy
Using cached Kivy-2.1.0.tar.gz (23.8 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Collecting setuptools
Using cached setuptools-65.6.3-py3-none-any.whl (1.2 MB)
Collecting wheel
Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Collecting cython!=0.27,!=0.27.2,<=0.29.28,>=0.24
Using cached Cython-0.29.28-py2.py3-none-any.whl (983 kB)
Collecting kivy_deps.gstreamer_dev~=0.3.3
Using cached kivy_deps.gstreamer_dev-0.3.3-cp311-cp311-win_amd64.whl (3.9 MB)
ERROR: Could not find a version that satisfies the requirement kivy_deps.sdl2_dev~=0.4.5 (from versions: 0.5.1)
ERROR: No matching distribution found for kivy_deps.sdl2_dev~=0.4.5
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I tried installing "cython" because it helped in some similar problems, however it did not change at all.
My version is 3.11.
you need to install it with command
pip install git+https://github.com/kivy/kivy
i have same with that problem, but i install it from github and its work

django update database everyday

I made a wordlegolf site, www.wordlegolfing.com, where my friends and I play wordle and it tracks our scores daily. I keep track of all the users scores and have a scoreboard shown on the site. If someone forgets to do the wordle that day I currently manually adjust there scores to reflect that but I would like to make it so this is done automatically. I have the site running on heroku currently. Not really looking for exact code but is there something easy to use that could run a program or something that allow me to check if a different field is null each day at midnight and if so save an input
I have tried celery and I cant get it to install
(wordleenv) kyleflannelly#MacBook-Pro-5 wordlegolfing % pip install django-celery
Collecting django-celery
Using cached django_celery-3.3.1-py3-none-any.whl (63 kB)
Collecting celery<4.0,>=3.1.15
Using cached celery-3.1.26.post2-py2.py3-none-any.whl (526 kB)
Requirement already satisfied: django>=1.8 in /Users/kyleflannelly/Dev/environments/wordleenv/lib/python3.10/site-packages (from django-celery) (4.1)
Requirement already satisfied: pytz>dev in /Users/kyleflannelly/Dev/environments/wordleenv/lib/python3.10/site-packages (from celery<4.0,>=3.1.15->django-celery) (2022.2.1)
Collecting kombu<3.1,>=3.0.37
Using cached kombu-3.0.37-py2.py3-none-any.whl (240 kB)
Collecting billiard<3.4,>=3.3.0.23
Using cached billiard-3.3.0.23.tar.gz (151 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: asgiref<4,>=3.5.2 in /Users/kyleflannelly/Dev/environments/wordleenv/lib/python3.10/site-packages (from django>=1.8->django-celery) (3.5.2)
Requirement already satisfied: sqlparse>=0.2.2 in /Users/kyleflannelly/Dev/environments/wordleenv/lib/python3.10/site-packages (from django>=1.8->django-celery) (0.4.2)
Collecting amqp<2.0,>=1.4.9
Using cached amqp-1.4.9-py2.py3-none-any.whl (51 kB)
Collecting anyjson>=0.3.3
Using cached anyjson-0.3.3.tar.gz (8.3 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in anyjson setup command: use_2to3 is invalid.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
│ exit code: 1
╰─> [1 lines of output]
error in anyjson setup command: use_2to3 is invalid.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
You don't need Celery to run a daily job.
You do need a script that does what you want. Since you want to interact with the Django database, a custom management command might be your best bet.
Once you have a script that does what you want, you can schedule it to run on your preferred schedule, e.g. daily at 2am.

orjson installation error during installation of cloned torch lighetning on ppc system (IBM)

I am trying to install lightening from setu.py but it fails while installing osjson-3.8.0. So, I tried to manually install it using pip install --upgrade orjson but it given error in pyproject.toml file.
Collecting orjson
Using cached orjson-3.8.1.tar.gz (860 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Cargo, the Rust package manager, is not installed or is not on PATH.
This package requires Rust and Cargo to compile extensions. Install it through
the system's package manager or via https://rustup.rs/
Checking for Rust toolchain....
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

`pip install` Gives Error on Some Packages

Some packages give errors when I try to install them using pip install. This is the error when I try to install chatterbot, but some other packages give this error as well:
pip install chatterbot
Collecting chatterbot
Using cached ChatterBot-1.0.5-py2.py3-none-any.whl (67 kB)
Collecting pint>=0.8.1
Downloading Pint-0.19.2.tar.gz (292 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 292.0/292.0 kB 1.6 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pyyaml<5.2,>=5.1
Using cached PyYAML-5.1.2.tar.gz (265 kB)
Preparing metadata (setup.py) ... done
Collecting spacy<2.2,>=2.1
Using cached spacy-2.1.9.tar.gz (30.7 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [35 lines of output]
Collecting setuptools
Using cached setuptools-65.0.1-py3-none-any.whl (1.2 MB)
Collecting wheel<0.33.0,>0.32.0
Using cached wheel-0.32.3-py2.py3-none-any.whl (21 kB)
Collecting Cython
Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.6-cp310-cp310-win_amd64.whl (36 kB)
Collecting preshed<2.1.0,>=2.0.1
Using cached preshed-2.0.1.tar.gz (113 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\oguls\AppData\Local\Temp\pip-install-qce7tdof\preshed_546a51fe26c74852ab50db073ad57f1f\setup.py", line 9, in <module>
from distutils import ccompiler, msvccompiler
ImportError: cannot import name 'msvccompiler' from 'distutils' (C:\Users\oguls\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_distutils\__init__.py)
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Encountered error while generating package metadata.
See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
I don't specifically know which packages cause this error, a lot of them install without any problems.
I have tried updating pip, changing environment variables and other possible solutions I've found on the internet, but nothing seems to work.
Edit: The package I am trying to install supports my Python version.
The real error in your case is:
ImportError: cannot import name 'msvccompiler' from 'distutils'
It occured because setuptools has broken distutils in version 65.0.0 (and has already fixed it in version 65.0.2). According to your log, the error occured in your global setuptools installation (see the path in error message), so you need to update it with the following command:
pip install -U setuptools
Those packages, however, may still not get installed or not work properly as the module causing this error doesn't support compiler versions needed for currently supported versions of Python.
Same thing happened with me, it was basically pip's version problem.
Try upgrading pip to latest version --22.3.1 and downgrade the python version from latest version --3.10.00 to 3.9.13...
pip --version check for pip's version
pip install notebook --upgrade -command to update pip to latest version
This worked for me

How can I solve problems installing packages in python (Failed building wheels)?

I'm trying to install several packages in Google Colab (python 3.7) and I find some errors.
The packages I'm installing are:
pillow==4.2.1
numpy==1.16.1
pandas==0.20.3
scipy==0.19.1
scikit-image==0.13.0
scikit-learn==0.19.1
matplotlib==2.2.2
tensorflow==1.2.1
concurrent-iterator==0.2.6
At first, I do:
!pip install --upgrade pip setuptools wheel
Then, I do the next (it is an example of one package):
!pip install pillow==4.2.1
But whit packages 4, 5 and 6 I found the next error:
WARNING: Ignoring invalid distribution -andas (/usr/local/lib/python3.7/dist-packages)
WARNING: Ignoring invalid distribution -andas (/usr/local/lib/python3.7/dist-packages)
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Collecting scipy==0.19.1
Using cached scipy-0.19.1.tar.gz (14.1 MB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: scipy
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Building wheel for scipy (setup.py) ... error
ERROR: Failed building wheel for scipy
Running setup.py clean for scipy
error: subprocess-exited-with-error
× python setup.py clean did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed cleaning build dir for scipy
Failed to build scipy
WARNING: Ignoring invalid distribution -andas (/usr/local/lib/python3.7/dist-packages)
Installing collected packages: scipy
Attempting uninstall: scipy
WARNING: Ignoring invalid distribution -andas (/usr/local/lib/python3.7/dist-packages)
Found existing installation: scipy 1.4.1
Uninstalling scipy-1.4.1:
Successfully uninstalled scipy-1.4.1
error: subprocess-exited-with-error
× Running setup.py install for scipy did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Running setup.py install for scipy ... error
WARNING: No metadata found in /usr/local/lib/python3.7/dist-packages
Rolling back uninstall of scipy
Moving to /usr/local/lib/python3.7/dist-packages/scipy-1.4.1.dist-info/
from /usr/local/lib/python3.7/dist-packages/~cipy-1.4.1.dist-info
Moving to /usr/local/lib/python3.7/dist-packages/scipy/
from /usr/local/lib/python3.7/dist-packages/~cipy
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> scipy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
After that, the version installed is the default in Google Colab, not the one I want.
I found this error only with packages 4, 5 and 6 and, after looking for information on internet, i didn't find a solution. I can't install modern versions because I need those in particular.

Categories

Resources