Pip module installation issue - python

I'm having difficulty installing modules using pip for python. The exact error message is:
Could not find a version that satisfies the requirement shapefile (from versions: DistributionNotFound: No matching distribution found for shapefile
When I type:
pip install -vvv shapefile
I get a 404 status code saying:
Could not fetch URL https://pypi.python.org/simple/shapefile/: 404 Client Error
I've browsed around and have seen there is a config file that allows you to change where pip installs modules from. However, I can't find this file in my /.pip folder.
Does anyone know how I would go about fixing my pip configuration so that I can install packages?

Here is a list that matches your module name: PyPI search result for shapefile
Maybe the module is called pyshapefile not just shapefile.
pip install pyshapefile

Related

Unable to find module install name / install module in Python

Appologies if this is confusing... I have spent most of today just trying to get the module for "shutil" installed in my instance of Python. I have tried what I thought would be the correct module from pypi.org to no avail. I have upgraded from 3.10 to 3.11 with no change in the message I have received. I am sure the pip install process works as I am able to install other modules fine. Despite my attempts, I continue to receive this message:
pip install shutil
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement shutil (from versions: none)
ERROR: No matching distribution found for shutil
Yes, I have seen a number of other solutions but so far they do not seem to work for me. Somewhere I even read that it was now an included module. That prompted me to upgrade my Python instance. I have also attempted including --trusted-host in my pip install attempts. Perhaps there is some Python config I missed? The environment paths are updated for the Python 3.11 install.
--corrected typo
shutil is a built in module, not one you have to install. Simply call
import shutil
at the top of your python code

Why can't I install jpype with pip?

Seeing this article connection to oracle with jdbc, I would also try this to connect to Oracle.
And then I tried to get 'jpype' with pip to import it on my module in advance.
But these message have appeared on my screen.
ERROR: Could not find a version that satisfies the requirement jpype (from versions: none)
ERROR: No matching distribution found for jpype
Could someone help with this solution?Messages on my screen
My version of pip seems to be 20.0.2.
Thanks!
Looking at the PyPI page for JPype we can see that the needed command is - pip install JPype1 and not pip install jpype. Always remember to cross check the page to make sure you are using the right command to install packages

How to install a predefined package(class) in google colab(python,Jupyter notebook)?

I have already defined a class which I want to use in my code.
in order to import it I know I have to install it first.(I am using google's colab)
to install first I uploaded the .py file into my drive which is mounted and no problem with that.
but still there is problem with installing the package.
how can I use this predefined class correctly in my code?
!pip install robotdef.py
Collecting robotdef.py
ERROR: Could not find a version that satisfies the requirement robotdef.py (from versions: none)
ERROR: No matching distribution found for robotdef.py
I think I overlooked one thing.
If "I uploaded the .py file into my drive which is mounted and no problem with that." is the situation, you don't have to run pip, but you'll need to expand the Python path to the directory where your package(class) is installed.
I hope this may help.
import sys
sys.path.append('/foo/bar/your-modules-path')
pip fetches a package from the Python Package Index (PyPI) repository. This means that the package must be registered on the repository first.
I tried to find 'robotdef.py' or 'robotdef' using a search form on the PyPI website, but it seems that 'robotdef.py' hasn't been registered yet...
If it's on the repository, !pip install <package name> will work fine on the Colab.
Supplement
Sorry, my answer was incomplete.
It's not necessary a package to be registered on the PyPI repository, but you can install a package from local archives, etc.

Why upload module in repository not found via pip install?

I upload module
example-framework.python.egg
via Jenkins in JFrog Artifactory.
Upload completed good without errors.
I checked in Artifactory, in repository browser saw in properties
pypi.name - example-framework
Tried to install module via artifactory.
pip install example-framework
pip returned error:
Collecting example-framework
Could not find a version that satisfies the requirement example-framework (from versions: )
No matching distribution found for example-framework
How solve this problem?
For the user running pip, make sure you have correctly setup your ~/.pip/pip.conf file to point to Artifactory. You can see an example of this in the Set Me Up box for the pipy repo.

Python: Install Dependencies into directory

I have a Python project that I want to get worked in Amazon aws Lambda. So i need to creat a deployment package. I tried it like explained on this page:
http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
But here my problem:
Some Dependencies I can install, some are not installable.
If I want to install requests into a directory, It installs. If I want to install json into a directory I get the following error massage: Directory '/Users/iTom/Desktop/project-dir' is not installable. File 'setup.py' not found.
Dont know if this is important: I tried also to install json in general an got this error: Could not find a version that satisfies the requirement json (from versions: )
No matching distribution found for json
Thanks for help :)
EDIT: I got told json already included. What is with codecs and urllib?
json is a built-in package already shipped with python, you need not install it. Please see the python reference https://docs.python.org/2/library/json.html

Categories

Resources