Python3 Magic for a Django project - python

I need the python-magic package for a Django project. However, I found out that since I am using python3, I need the python3-magic package, which I can either get using pip3 or using apt-get.
I am a macOS user, so I don't have an apt-get, and I cannot install the package using pip3. It gives me the following error when I type: pip3 install python3-magic.
ERROR: Could not find a version that satisfies the requirement python3-magic (from versions: none)
ERROR: No matching distribution found for python3-magic
Is there any way I can get this package for my Django project? No matter what I do, the package appears uninstalled on my VS Code.

If you install this through pip3, the name of the package is python-magicĀ [PyPi], not python3-magic, so:
pip3 install python-magic
If you use apt-get, you can work with python3-magic and python-magic. These are not links to a Python package, but in essence intallations scripts that will work with pip3 and pip respectively. See for example the files of the python3-magic packageĀ [ubuntu-packages].

Related

Cannot install deepspeech of python

I want to use DeepSpeech of Mozilla on my Linux 22.04 system, following this website:
https://deepspeech.readthedocs.io/en/r0.9/?badge=latest
At the very beginning line, at
pip3 install deepspeech
I got this error:
ERROR: Could not find a version that satisfies the requirement deepspeech (from versions: none)
ERROR: No matching distribution found for deepspeech
I ran into internet and followed all methods such as upgrading pip3, using pip instead of pip3. I could not solve the problem.
This website:
https://github.com/mozilla/DeepSpeech/issues/3693
suggests to use archive. I did not understand which repository should I archive at this step.
It is very nice of you if you can help me
The pip command you mentioned above worked for me:
Try updating your linux packages
sudo apt update
sudo apt upgrade
Then trying again if it does not work trying using python
python -m pip install deepspeech

Error when i install python=3.6.4 version in my virtual environment

I am trying to install python version 3.6.4 on my virtual environment but having errors.
I tried using pip install python==3.6.4 but this is giving me error.
ERROR: Could not find a version that satisfies the requirement python==3.6.4 (from versions: none)
ERROR: No matching distribution found for python==3.6.4
You can't use pip to install python. pip is a package powered by python. If you want to use a different version of Python within your virtualenv, refer to this question.

Not able to install skbuild

I am trying to install "CMake" with command
pip3 install CMake.
Its gives an error for a module "skbuild"
from skbuild import setup, ModuleNotFoundError: No module named 'skbuild'
But but when tried to install skbuild with command
pip3 install skbuild
it gives error
"Could not find a version that satisfies the requirement skbuild (from versions: ) No matching distribution found for skbuild".
I am not able to solve this error. Please help. I trying the implementation it on Window 10. Using Python 3.7.0. I tried couple of versions of pip3 (10.0.1, 9.0.3, 9.0.2, 9.0.1). Nothing is working.
Try pip install scikit-build. For me, pip install cmake works properly afterwards.
this worked for me while installation of this github repo https://github.com/ultralytics/yolov3
# For pip
pip install scikit-build
# For pip3
pip3 install scikit-build
There are pre-compiled binaries available on THIS page for Windows as MSI packages and ZIP files. You can find the one for the OS you are using.
If you want to proceed with your current approach then can you can probably refer THIS LINK

Can't install old versions with pip anymore

I'n using pip 1.5.1 which worked fine up until today.
Now, I'm trying to install a requirements.txt in a fresh virtualenv, and for many packages it can no longer find specific old version for most packages.
$ pip install django-endless-pagination==1.1
Downloading/unpacking django-endless-pagination==1.1
Could not find a version that satisfies the requirement django-endless-pagination==1.1 (from versions: 2.0)
Some externally hosted files were ignored (use --allow-external to allow).
Cleaning up...
No distributions matching the version for django-endless-pagination==1.1
What do I need to do to get this to work again? Upgrading my app to use all the latest versions of all its packages is out of the question.
Update:
This works fine in pip 1.4.1. It's the newer version of pip that's causing it to fail.
From PIP 1.5 changelog:
BACKWARD INCOMPATIBLE
pip no longer will scrape insecure external urls by default nor will it install externally hosted files by
default. Users may opt into installing externally hosted or insecure
files or urls using --allow-external PROJECT and --allow-unverified
PROJECT
So in this case following ought to work the same way as old PIP:
pip install django-endless-pagination==1.1 \
--allow-all-external --allow-unverified django-endless-pagination
(There is no --allow-all-unverified, each unverified project name must be specified)
In case of using requirements.txt, it should be specified like this:
--allow-external django-endless-pagination
--allow-unverified django-endless-pagination
django-endless-pagination==1.1
In this case, you can use the URL of the appropriate zip file as input to pip install::
pip install https://github.com/frankban/django-endless-pagination/archive/v1.1.zip
Of course, not every package will have such a URL available, but most do.
I've occasionally used this to install the latest-greatest master, since in some cases the cheeseshop didn't have Python 3 ready packages yet.
Because the version on PyPI is 2.0 and pip now tries to honor the fact that maintainer wants you to use given version.

pip could not install asyncmongo

I'm very new in Python and need to install asyncmongo package for my environment. But when I
excuting pip install asyncmongo it fails with the following error.
C:\git\project>pip install asyncmongo
Downloading/unpacking asyncmongo
Could not find any downloads that satisfy the requirement asyncmongo
Some externally hosted files were ignored (use --allow-external asyncmongo to allow).
Cleaning up...
No distributions at all found for asyncmongo
Storing debug log for failure in C:\Users\Name\pip\pip.log
What I'm doing wrong?
I had the same issue just now (guessing that the library you're trying to install doesn't have a distribution up on the repository which pip is using). Instead, install the easy_install utility and do:
easy_install asyncmongo
Also, as a side note, I'd recommend using virtualenv and virtualenvwrapper which comes with pip/easy_install.
They segregate your python installs and it is basically like using a python install for every project you work on instead of sharing it globally. It includes both pip and easy_install which is useful because when I can't find something with pip or if the pip install fails, I'm usually able to find it with easy_install.
I found the solution. The problem was caused because of asyncmongo 1.2.2 sources was hasted on the amazon file server, so in that case pip should be invoked with additional flags (--allow-external packagename and --allow-unverified packagename) so to install it properly follwing command should be executed:
pip install --allow-external asyncmongo --allow-unverified asyncmongo asyncmongo
You are on Windows platform and pip is not as great for Windows as for Linux or Mac. easy_install has some some advantages on Windows, such as installing a precompiled .exe binary.
On a different note, you may consider using motor instead of asyncmongo. It is newer and looks more elegant.

Categories

Resources