I cannot install conda in python - python

I type pip install conda in cmd but it came out like this :
Collecting conda
Using cached conda-4.3.16.tar.gz (299 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
WARNING: Your current install method for conda only supports conda
as a python library. You are not installing a conda executable command
or activate/deactivate commands. If your intention is to install conda
as a standalone application, currently supported install methods include
the Anaconda installer and the miniconda installer. If you'd still like
for setup.py to create entry points for you, use `utils/setup-testing.py`.
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\PHU PHUC\AppData\Local\Temp\pip-install-fr270g_y\conda_a287c5dfce9b412b845e064492896238\setup.py", line 35, in <module>
import conda._vendor.auxlib.packaging # NOQA
File "C:\Users\PHU PHUC\AppData\Local\Temp\pip-install-fr270g_y\conda_a287c5dfce9b412b845e064492896238\conda\__init__.py", line 13, in <module>
from .common.compat import iteritems, text_type
File "C:\Users\PHU PHUC\AppData\Local\Temp\pip-install-fr270g_y\conda_a287c5dfce9b412b845e064492896238\conda\common\compat.py", line 77, in <module>
from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (C:\Users\PHU PHUC\AppData\Local\Programs\Python\Python310\lib\collections\__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.
How can I fix it?
Thanks very much

Related

How to install pylibfreenect in python?

Im trying to install pylibfreenect in Pycharm but its giving me this error message:
Collecting pylibfreenect2
Using cached pylibfreenect2-0.1.4.tar.gz (125 kB)
Preparing metadata (setup.py) ... 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\Steffen\AppData\Local\Temp\pip-install-wbvm76g8\pylibfreenect2_46804a2858bc48829d3d48cfaa63fcde\setup.py", line 25, in <module>
raise OSError("{}: is not found".format(libfreenect2_configh_path))
OSError: /usr/local/include\libfreenect2\config.h: is not found
[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.
I looked up the GitHub forum https://github.com/OpenKinect/libfreenect but I dont know how to install libfreenect from there.
I know it cannot find config.h because the website is down. How can I still install it?
If possible detailed instructions please.
To intall libfreenect2 on Windows, you need to install few dependencies libusb, TurboJPEG, GLFW.
And then you need to clone libfreenect2 repo to build using make && make install command. This will install libfreenect2 on your machine.
Same steps are for MacOS.
See this readme for detailed steps - https://github.com/OpenKinect/libfreenect2/blob/master/README.md

Not able to install the wxPython 4.2.0 library,python version 3.11

Please check the error below, my python version is 3.11.
C:\WINDOWS\system32>pip install wxPython
Collecting wxPython
Using cached wxPython-4.2.0.tar.gz (71.0 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 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\User\AppData\Local\Temp\pip-install-wvjzqe_a\wxpython_68bc31ed61f445a3971064110725d233\setup.py", line 27, in <module>
from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
File "C:\Users\User\AppData\Local\Temp\pip-install-wvjzqe_a\wxpython_68bc31ed61f445a3971064110725d233\buildtools\config.py", line 30, in <module>
from attrdict import AttrDict
ModuleNotFoundError: No module named 'attrdict'
[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.
I just really need this library, I don't know what to do.
You are missing a package called attrdict which is a dependency as shown in the error, please try this pip3 install attrdict and then install wxPython
Try to:
go to directory of your Python e.g C:\Python312\Lib\site-packages\attrdict
and edit files:
mixins.py , mapping.py , merge.py , default.py
by changing line:
from collections import Mapping
to
from collections.abc import Mapping
Then Install requests:
pip install requests
Then try to instal again wxPython by:
pip install wxPython

Can't install Opencv on raspberry pi 4

I'm using the raspberry pi 4 on visual studio code and whenever I enter the command pip install opencv-python in the terminal, after 40 mins I get the error message
FileNotFoundError: [Errno 2] No such file or directory: '_skbuild/linux-armv7l-3.9/cmake-install/python/cv2/config-3.py'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects
I have found a post on the same problem but the suggestion was to upgrade pip and try reinstalling opencv but that hasn't worked either. I'm using python 3.9.2 as an interpreter
Edit:
When I use the command pip3 install --no-use-pep517 opencv-python I get the 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 "/tmp/pip-install-zwr61c7o/opencv-python_1867909748974f69a8333e238206f9df/setup.py", line 10, in <module>
import skbuild
ModuleNotFoundError: No module named 'skbuild'
[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.

Mariadb Python client/module install on Cygwin

I have Python 3.9 installed on Cygwin on WIndows.
I also have XAMPP installed, which provides MariaDB v 10.4.24.
I am trying to write Python scripts that read data from this database.
I am trying to install the Python MariaDB module using:
python3.9.exe -m pip3 install mariadb
But this errors as follows:
python3.9.exe -m pip install mariadb
Collecting mariadb
Using cached mariadb-1.1.4.zip (97 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-xws9o_01/mariadb_c1764ac5dcde44ab9a779bf22da89a5b/setup.py", line 27, in <module>
cfg = get_config(options)
File "/tmp/pip-install-xws9o_01/mariadb_c1764ac5dcde44ab9a779bf22da89a5b/mariadb_posix.py", line 64, in get_config
print('MariaDB Connector/Python requires MariaDB Connector/C '
TypeError: not enough arguments for format string
[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.

I am stack with errors using this command pip install nvidia-tensorflow[horovod]

(tensorholo) C:\Users\alaba\Desktop\MIT PROJECT\tensor_holography-main>pip install nvidia-tensorflow[horovod]
Collecting nvidia-tensorflow[horovod]
Downloading nvidia-tensorflow-0.0.1.dev5.tar.gz`` (7.9 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [19 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\alaba\AppData\Local\Temp\pip-install-ztjzt002\nvidia-tensorflow_001bf7a090024c37a3c7ff91374ac7c4\setup.py", line 150, in <module>
raise RuntimeError(open("ERROR.txt", "r").read())
RuntimeError:
###########################################################################################
The package you are trying to install is only a placeholder project on PyPI.org repository.
This package is hosted on NVIDIA Python Package Index.
This package can be installed as:
```
$ pip install nvidia-pyindex
$ pip install nvidia-tensorflow
```
Please refer to NVIDIA instructions: https://github.com/NVIDIA/tensorflow#install.
###########################################################################################
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.
nvidia-tensorflow[horovod] package doesn't support the Windows platform. You'd need to run it inside a WSL2 (Windows Subsystem for Linux version 2) to make it work on Windows.
Like the official docs say:
The nvidia-tensorflow package includes CPU and GPU support for Linux.
And also this issue on the same repository:

Categories