Incompatible module packages need to be solved - python

Well, I ran into two troubles when I want to install the modules. The first one is
1) statsmodels 0.13.2 has requirement packaging>=21.3, but you have packaging 20.9.
2) tensorflowjs 3.19.0 requires packaging~=20.9, but you have packaging 21.3 which is incompatible.
The second one is
1)sktime 0.11.0 has requirement numba>=0.53, but you have numba 0.49.0.
2)ddsp 3.2.0 requires numba<0.50, but you have numba 0.56.0 which is incompatible.
They are both conflicting, and I don't know how to do so.

Related

No module named 'social_django' but 'social-auth-app-django' is installed

Summary of Issue
I am creating a Django project and attempting to setup Auth0 integrations. Per Auth0's documentation, I installed the social-auth-app-django library which then went and also installed social-auth-core. So please note that both these libraries are installed.
Here is my py -m pip list output proving such:
Package Version
---------------------- ---------
asgiref 3.4.1
certifi 2021.10.8
cffi 1.15.0
charset-normalizer 2.0.7
colorama 0.4.4
cryptography 35.0.0
defusedxml 0.7.1
Django 3.2.9
ecdsa 0.17.0
idna 3.3
oauthlib 3.1.1
pip 21.3.1
pyasn1 0.4.8
pycparser 2.21
PyJWT 2.3.0
python-dotenv 0.19.2
python-jose 3.3.0
python-social-auth 0.3.6
python3-openid 3.2.0
pytz 2021.3
requests 2.26.0
requests-oauthlib 1.3.0
rsa 4.7.2
setuptools 57.4.0
six 1.16.0
social-auth-app-django 5.0.0
social-auth-core 4.1.0
sqlparse 0.4.2
urllib3 1.26.7
As you can see, I'm running Django 3.2.9. I am also using Python 3.10.
After following all of Auth0's steps, I went to run py manage.py migrate and receive the following ending error message:
ModuleNotFoundError: No module named 'social_django'
What I have tried
I have tried uninstalling and reinstalling the social-auth-app-django and social-auth-core libraries multiple times. I have also tried installing the libraries individually instead of just installing social-auth-app-django. I have also tried installing social-auth-app[django] (using brackets). Nothing has worked.
Every post I can find online is telling the OP to install the social-auth-app-django library and that should fix their problem. But as demonstrated, I believe I've already done that. So unless there's a different way I need to install the library, I need a different solution.
Any and all help would be greatly appreciated. Thank you!
Huge credit to #furas in the comments helping point me in the right direction.
The Solution: Reinitialize the virtual environment using python 3.10 instead of python 3.8 and reinstall necessary packages.
Explanation: The problem was that I had inadvertently created my venv using python 3.8. So even though I'd run py -m pip list successfully while inside of the 3.8 venv, all of my packages were still installed using python 3.8. So when I'd try and migrate using python 3.10, the packages weren't viewable.

Sklearn conflict in setup.py

I'm developing a python package that requires scikit-learn as a dependency, so in the setup.py I have:
install_requires=['scikit-learn>=0.20.0']
I upload the package to test.pypi.org and when tried to install it in a virtual env I get this error: "ERROR: Cannot install package because these package versions have conflicting dependencies."
The conflict is caused by:
scikit-learn 0.24.1 depends on numpy>=1.13.3
scikit-learn 0.24.0 depends on numpy>=1.13.3
scikit-learn 0.23.2 depends on numpy>=1.13.3
scikit-learn 0.23.1 depends on numpy>=1.13.3
scikit-learn 0.23.0 depends on numpy>=1.13.3
scikit-learn 0.22 depends on numpy>=1.11.0
scikit-learn 0.21.0 depends on numpy>=1.11.0
scikit-learn 0.20.3 depends on scipy>=0.13.3
Also tried with others versions of sklearn with the same errors
I tried to add numpy>=1.13.3 (and in other try numpy>=1.11.0) in my setup.py but then it says It can't find a distribution that satisfies the requirement
Any ideas of how this could be fixed? Thanks
maybe try and download numpy required version from github page?

Error installing tensorflow-io kaggle notebook

I'm trying to install tensorflow-io to work with flac audio files
For that I use this command pip install -q tensorflow-io
But I got this Error:
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.
kubernetes 10.1.0 requires pyyaml~=3.12, but you have pyyaml 5.3.1 which is incompatible.
jupyterlab-git 0.10.0 requires nbdime<2.0.0,>=1.1.0, but you have nbdime 2.0.0 which is incompatible.
google-cloud-pubsub 1.4.3 requires google-api-core[grpc]<1.17.0,>=1.14.0, but you have google-api-core 1.23.0 which is incompatible.
earthengine-api 0.1.244 requires google-api-python-client>=1.12.1, but you have google-api-python-client 1.8.0 which is incompatible.
bokeh 2.2.3 requires tornado>=5.1, but you have tornado 5.0.2 which is incompatible.
astroid 2.3.3 requires wrapt==1.11.*, but you have wrapt 1.12.1 which is incompatible.
aiobotocore 1.1.2 requires botocore<1.17.45,>=1.17.44, but you have botocore 1.19.31 which is incompatible.
How to install tensorflow-io on kaggle notebook
I think it's only a warning. I got the same somedays back when I did
!pip install tensorflow-io
It got installed successfully and I was able to train also.

How do I find the openpyxl version number

I was given a PC with anaconda already installed. I have got no idea which version it is other than 3.
Whenever I try to lookup techniques on openpyxl, there seem to be several, depending on the version of openpyxl. One answer will say do it one way for version 1.8, another will say do it some other way for 2.5.
How do I find out which version of openpyxl is installed so I can avoid trying techniques that either no longer work or only work for later versions.
I've looked through https://openpyxl.readthedocs.io/en/stable/api/openpyxl.html . There doesn't seem to be a function that returns the version number.
Assuming you have imported openpyxl, openpyxl.__version__ gives the version number.
You can also find the version from an installer package if you used one. I installed openpyxl using pip3, so pip3 list at the shell prompt will show the current version for all pip3 installed packages. You may need to use pip list if that is what was used on your machine.
Package Version
---------------------- ----------
astroid 2.3.3
certifi 2019.11.28
chardet 3.0.4
click 7.1.1
dnspython 1.16.0
et-xmlfile 1.0.1
idna 2.9
isort 4.3.21
jdcal 1.4.1
lazy-object-proxy 1.4.3
lml 0.0.9
mccabe 0.6.1
mysql-connector-python 8.0.19
openpyxl 3.0.3

Can I still use virtualenv after installing Anaconda?

I used to use virtualenv to create different project environments, same library (different versions). Recently, I installed Anaconda to do some Machine Learning. When I try to create a new environment using virtualenv I get this error:
(venv) usr#KC-SCE:~/Desktop/bTree$ pip install nltk
Requirement already satisfied: nltk in /home/usr/anaconda3/lib/python3.6/site-packages (3.3)
Requirement already satisfied: six in /home/usr/anaconda3/lib/python3.6/site-packages (from nltk) (1.11.0)
tensorflow-tensorboard 1.5.1 has requirement bleach==1.5.0, but you'll have bleach 2.1.3 which is incompatible.
tensorflow-tensorboard 1.5.1 has requirement html5lib==0.9999999, but you'll have html5lib 1.0.1 which is incompatible.
tensorboard 1.8.0 has requirement bleach==1.5.0, but you'll have bleach 2.1.3 which is incompatible.
tensorboard 1.8.0 has requirement html5lib==0.9999999, but you'll have html5lib 1.0.1 which is incompatible.
jupyterlab 0.32.1 has requirement jupyterlab_launcher<0.11.0,>=0.10.0, but you'll have jupyterlab-launcher 0.11.0 which is incompatible.
What I do not understand is that why I am not able to download a library that already exists! I may need it in another version or else.

Categories