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.
Related
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.
I've tried uninstalling and reinstalling Anaconda. and upgrading pandas and most other questions that ask this question. I am working with a brand new installation of Anaconda. with python 3.7, Why is pandas not importing normally?
I have tried manually installing pip install pytz --upgrade and pip install python-datutil --upgrade to no avail. However, After doing these two commands I can now import pandas in the terminal but not in my script where i need it.
The Script where i am trying to import pandas is inside a git repo that perhaps needs to be reconfigured. I suspect that might be the issue. but im not sure how to change how python interacts with pandas from within git.
Here is the stacktrace...
File "C:\Users\jgreaves\Anaconda3\lib\site-packages\pandas\__init__.py", line 37, in <module>
f"C extension: {module} not built. If you want to import "
ImportError: C extension: No module named 'dateutil.tz'; 'dateutil' is not a package not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.```
Here is the config of my virtual environment
```# Name Version Build Channel
ca-certificates 2020.1.1 0 anaconda
certifi 2020.4.5.2 py38_0 anaconda
numpy 1.18.5 pypi_0 pypi
openssl 1.1.1g he774522_0 anaconda
pandas 1.0.4 pypi_0 pypi
pip 20.0.2 py38_3 anaconda
pyodbc 4.0.30 pypi_0 pypi
python 3.8.3 he1778fa_0 anaconda
python-dateutil 2.8.1 pypi_0 pypi
pytz 2020.1 pypi_0 pypi
regex 2020.6.8 pypi_0 pypi
setuptools 47.1.1 py38_0 anaconda
six 1.15.0 pypi_0 pypi
sqlite 3.31.1 he774522_0 anaconda
vc 14.1 h0510ff6_4 anaconda
vs2015_runtime 14.16.27012 hf0eaf9b_2 anaconda
wheel 0.34.2 py38_0 anaconda
wincertstore 0.2 py38_0 anaconda ```
So after having a friend of mine take a look at my directory. We discovered that I had a file in my working directory called "dateutil.py" which was supposed to be a module for my code that I very uncleverly named. This was what was causing the issue. I have since renamed the file and everything is working fine now.
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
I ma trying to install https://pypi.python.org/pypi/python-epo-ops-client
I tried installing it from pip from both latest version.
python 2.7.12 and
python 3.5.2
for both of the version it says
C:\Users\me>pip install python-epo-ops-client 2.1.0
Collecting python-epo-ops-client
Using cached python_epo_ops_client-2.1.0-py2.py3-none-any.whl
Collecting 2.1.0
Could not find a version that satisfies the requirement 2.1.0 (from versions:
)
No matching distribution found for 2.1.0
As I am completely new to python, question is:
1) Do I need to install all python version to see which version above module is compatible with?
Or
2) can I know which version of python will be compatible with above version?
I want to install python for above package only. please suggest.
You are having space between python-epo-ops-client & 2.1.0, so it is trying to install two packages.
(1) python-epo-ops-client and
(2) 2.1.0, but there isn't any package named "2.1.0"
To install specific version you need to mention ==.
pip install python-epo-ops-client==2.1.0
I am new to virtualenvironment and an advanced beginner in python.
I am trying to run a jupyter notebook but it seems that when I create a virtualenvironment the jupyter kernel used is the one of my system and not the one of the virtualenvironment I created.
For this reason I am trying to understand how to create a clean virtualenvironment.
What I do is the following:
- Create virtualenvironment named testenv1:
virtualenv -p python3 testenv1
- activate testenv1:
source testenv1/bin/activate
Here it starts something I don't understand. If I list all the packages installed I have a lot of them already. Is there a way to force a completely clean virtualenv?
Thanks.
pip list
Package Version
----------------------------- -------
actionlib 1.11.13
angles 1.9.12
bondpy 1.8.3
camera-calibration 1.12.23
camera-calibration-parsers 1.11.13
catkin 0.7.20
cv-bridge 1.12.8
diagnostic-analysis 1.9.3
diagnostic-common-diagnostics 1.9.3
diagnostic-updater 1.9.3
dynamic-reconfigure 1.5.50
gazebo-plugins 2.5.19
gazebo-ros 2.5.19
gencpp 0.6.0
geneus 2.2.6
genlisp 0.4.16
genmsg 0.5.11
gennodejs 2.0.1
genpy 0.6.7
image-geometry 1.12.8
interactive-markers 1.11.5
joint-state-publisher 1.12.15
laser-geometry 1.6.5
message-filters 1.12.14
pip 20.0.2
pluginlib 1.11.3
python-qt-binding 0.3.7
qt-dotgraph 0.3.17
qt-gui 0.3.17
qt-gui-cpp 0.3.17
qt-gui-py-common 0.3.17
resource-retriever 1.12.6
rosbag 1.12.14
rosboost-cfg 1.14.6
rosclean 1.14.6
roscreate 1.14.6
rosgraph 1.12.14
roslaunch 1.12.14
roslib 1.14.6
roslint 0.11.0
roslz4 1.12.14
rosmake 1.14.6
rosmaster 1.12.14
rosmsg 1.12.14
rosnode 1.12.14
rosparam 1.12.14
rospy 1.12.14
rosservice 1.12.14
rostest 1.12.14
rostopic 1.12.14
rosunit 1.14.6
roswtf 1.12.14
rqt-action 0.4.9
rqt-bag 0.4.12
rqt-bag-plugins 0.4.12
rqt-console 0.4.9
rqt-dep 0.4.9
rqt-graph 0.4.11
rqt-gui 0.5.0
rqt-gui-py 0.5.0
rqt-image-view 0.4.14
rqt-launch 0.4.8
rqt-logger-level 0.4.8
rqt-moveit 0.5.7
rqt-msg 0.4.8
rqt-nav-view 0.5.7
rqt-plot 0.4.8
rqt-pose-view 0.5.8
rqt-publisher 0.4.8
rqt-py-common 0.5.0
rqt-py-console 0.4.8
rqt-reconfigure 0.5.1
rqt-robot-dashboard 0.5.7
rqt-robot-monitor 0.5.8
rqt-robot-steering 0.5.9
rqt-runtime-monitor 0.5.7
rqt-rviz 0.5.10
rqt-service-caller 0.4.8
rqt-shell 0.4.9
rqt-srv 0.4.8
rqt-tf-tree 0.6.0
rqt-top 0.4.8
rqt-topic 0.4.11
rqt-web 0.4.8
rviz 1.12.17
sensor-msgs 1.12.7
setuptools 46.1.3
smach 2.0.1
smach-ros 2.0.1
smclib 1.8.3
tf 1.11.9
tf-conversions 1.11.9
tf2-geometry-msgs 0.5.20
tf2-kdl 0.5.20
tf2-py 0.5.20
tf2-ros 0.5.20
topic-tools 1.12.14
wheel 0.34.2
xacro 1.11.3
WARNING: You are using pip version 20.0.2; however, version 20.1 is available.
You should consider upgrading via the '/home/schiano/virtualenvs/testenv1/bin/python -m pip install --upgrade pip' command.
Main python installed in your system already have the packages in it. and when you try to create a virtual environment in your system, it create a copy of the main python environment.
you can uninstall all the packages from main python environment by running:
pip uninstall <package name>
It will ask you for your permission for removal, press y.
or if you want to do it in one go:
pip freeze > any_path_on_your_system/requirements.txt
pip uninstall -r any_path_on_your_system/requirements.txt
it will ask for your permission for each uninstall. press y
Install package virtualenv
pip install virtualenv
In this way, all the packages from main python will be removed and then, try your method of creating virtual environment.
reference: https://docs.python-guide.org/dev/virtualenvs/