I'm new to Python Django, I have integrated my Django application on Windows 7 machine. When I tried to integrate LDAP by using pip install django-auth-ldap but unfortunately I got an error
Failed building wheel for python-ldap
Running setup.py clean for python-ldap
Failed to build python-ldap
django-python3-ldap 0.11.1 has requirement pyasn1==0.3.2, but you'll have pyasn1 0.4.4 which is incompatible.
Please help me to escape me from this issue, bcz I have been struck here for a couple of days
I think this message is pretty clear:
django-python3-ldap 0.11.1 has requirement pyasn1==0.3.2, but you'll have pyasn1 0.4.4 which is incompatible.
When using django-python3-ldap you have to explicitly use version 0.3.2 of module pyasn1. But something else already installed a newer version of pyasn1 to you build environment.
So you have to specify version pinning information in install_requires or requirements files.
Try Updating pip using
python -m pip install -U pip
or
pip install --upgrade pip
Related
pip install google-cloud-bigquery
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /home/ec2-user/anaconda3/envs/python3/lib/python3.8/site-packages (from pyasn1-modules>=0.2.1->google-auth<3.0dev,>=1.25.0->google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-cloud-bigquery) (0.4.8)
Installing collected packages: pyasn1-modules, protobuf, grpcio, google-crc32c, cachetools, proto-plus, googleapis-common-protos, google-resumable-media, google-auth, grpcio-status, google-api-core, google-cloud-core, google-cloud-bigquery-storage, google-cloud-bigquery
Attempting uninstall: protobuf
Found existing installation: protobuf 3.19.1
Uninstalling protobuf-3.19.1:
Successfully uninstalled protobuf-3.19.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
sagemaker 2.117.0 requires protobuf<4.0,>=3.1, but you have protobuf 4.21.9 which is incompatible.
Successfully installed cachetools-5.2.0 google-api-core-2.10.2 google-auth-2.14.1 google-cloud-bigquery-3.4.0 google-cloud-bigquery-storage-2.16.2 google-cloud-core-2.3.2 google-crc32c-1.5.0 google-resumable-media-2.4.0 googleapis-common-protos-1.57.0 grpcio-1.51.0 grpcio-status-1.51.0 proto-plus-1.22.1 protobuf-4.21.9 pyasn1-modules-0.2.8
WARNING: You are using pip version 22.0.4; however, version 22.3.1 is available.
You should consider upgrading via the '/home/ec2-user/anaconda3/envs/python3/bin/python -m pip install --upgrade pip' command.
Note: you may need to restart the kernel to use updated packages.
ContextualVersionConflict: (protobuf 3.19.1 (/home/ec2-user/anaconda3/envs/python3/lib/python3.8/site-packages), Requirement.parse('protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5'), {'google-cloud-bigquery-storage'})
Try running pip install -U protobuf~=3.20.0 and then pip install google-cloud-bigquery.
Protobuf 4.x versions have some incompatibilities with other libraries.
Ref: How to downgrade protobuf
Why does this happens when downgrading the library
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pyppeteer 0.2.5 requires importlib-metadata<3.0.0,>=2.1.1; python_version < "3.8", but you have importlib-metadata 4.12.0 which is incompatible.
pyppeteer 0.2.5 requires urllib3<2.0.0,>=1.25.8, but you have urllib3 1.24.3 which is incompatible.
Successfully installed appdirs-1.4.4 attrs-22.1.0 black-22.1.0 click-8.1.3 importlib-metadata-4.12.0 pathspec-0.10.1 regex-2022.8.17 toml-0.10.2 typed-ast-1.5.4 typing-extensions-4.3.0 zipp-3.8.1
WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
You should consider upgrading via the '/Users/admin/.local/share/virtualenvs/scrapers-XJakbnzz/bin/python -m pip install --upgrade pip' command.
This is a conflict of package versions. To fix it, you'll need to follow these steps:
1)pip list
2)copy all of your packages
3)create a new file called requirements.txt
4)put all of your packages in there (without versions). The file should look like this:
autopep8
certifi
chardet
charset-normalizer
click
colorama
discord
Flask
itsdangerous
pip
praw
(except this has to be a list of your packages that you got while running pip list)
5)pip install -r requirements.txt
This will tell pip to solve the version conflict.
I'm setting up my project in MacOs and needed to install requirements (including Pillow). When I run the pip3 install -r requirements.txt, everything goes fine until I receive the following message:
ERROR: Could not build wheels for backports.zoneinfo, which is required to install pyproject.toml-based projects
I've seen similar question which answers are to upgrade pip, which I did, but the error remains the same.
I'm using Python 3.10 in a venv on MacOS
backport zoneinfo does not have wheels for python3.10. So you will have to use 3.9 or lower version till the 3.10 wheels are released.
I'm learning python and want this code to work.
import pandas
df =pandas.DataFrame([[2,4,6],[10,20,30]])
print(df)
This is what I get:
File "C:\Users\User\Anaconda3\lib\site-packages\pandas\__init__.py", line 19, in <module>
"Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']
I'm using pycharm with anaconda environment. Hopefully I've set the environment and interpreter up right. It says I have numpy version 1.16.2 installed, however it won't let me upgrade to version 1.17.0
Tried installing, uninstalling and upgrading through packages and terminal and upgraded pip. This is what I get:
Installing collected packages: numpy
Found existing installation: numpy 1.16.4
Uninstalling numpy-1.16.4:
Successfully uninstalled numpy-1.16.4
Successfully installed numpy-1.17.0
WARNING: You are using pip version 19.1.1, however version 19.2.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\User\Documents\Python>python -m pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/62/ca/94d32a6516ed197a491d17d46595ce58a83cbb2fca280414e57cd86b84dc/pip-19.2.1-py2.py3-none-any.whl (1.4MB)
|████████████████████████████████| 1.4MB 114kB/s
Installing collected packages: pip
Found existing installation: pip 19.1.1
Uninstalling pip-19.1.1:
Successfully uninstalled pip-19.1.1
Successfully installed pip-19.2.1
I'm very new to all this and probably doing something wrong, someone please help.
enter image description here
I would advise you to try and use the Anaconda GUI Navigator, available through the standard download of Anaconda Software Bundle.
You can easily manipulate virtual environments and install/uninstall different packages, using the self-explanatory GUI. I found it very simple and a good way to start using Anaconda and Python:
I'm sure there have been others who had this same problem, but those kind of posts of been difficult to track down or don't help resolve my issue.
I'm trying to get an old Django project from 2015 up and running but it keep encountering runtime errors on the newer version of Django and Python. This project was originally built in Django 1.6.5 using Python 3.2.2, so I'm trying to recreate that dev environment so I can see the project working and hope to bring it up to standard with at least Python 3.4 and Django 1.11.
I have Python 3.2.2 installed, but I've run into problems getting Pip to install. I'm aware that Pip wasn't bundled with Python until 3.3, so I'm trying to install it myself using get-pip from https://bootstrap.pypa.io/3.2/get-pip.py. When I execute this script it returns an error.
PS F:\temp> python get-pip.py 7.1.2
Collecting 7.1.2
Could not find a version that satisfies the requirement 7.1.2 (from versions: )
No matching distribution found for pip 7.1.2
I found this post (Install pip<v8 in python3.2) that led me to bootstrap.pypa.io, but the solutions there isn't helping.
Am I installing pip 7.1.2 correctly, or does it just flat out not exist anymore in 2018?
setuptools dropped support for Python 3.2 at version 30.0 so first thing is to downgrade setuptools:
pip install -U 'setuptools<30`
Then download wheel for version 7.1.2 and install it:
pip install -U pip-7.1.2-py2.py3-none-any.whl
If that still doesn't work: download source code, untar the archive and run
python setup.py install