OS: windows 7 (x64)
Python: 3.2
Django: 1.3.1
So I am trying to install Django and am getting the following error:
file "setup.py", line 70
if u'SVN' in version:
syntaxError: invalid syntax
So I know this is a compatibility issue with python3.2 and would not be a problem if I re-install python 2.6 instead. My question is there a way around this now? Or is Django still only compatible with python2.6 only?
Django 1.3.1 is compatible with Python versions from 2.4 to 2.7.
There are people working on an experimental port to Python 3 now. But for the time being your best bet is to install Python 2.7.
Update: There is official work being done to port Django to Python 3. See this blog post for more information.
Related
I am using tensorflow in a python module, which is called by a c++ file. I moved to a new computer, where I installed ros again. So it works on one computer, but not on the other. There I got the following error:
UserWarning: h5py is running against HDF5 1.10.0 when it was built against 1.10.4, this may cause problems '{0}.{1}.{2}'.format(*version.hdf5_built_version_tuple)
then I did:
pip2.7 uninstall h5py
pip2.7 install h5py==1.10.4
but then I get the following error:
No handlers could be found for logger "keyring.backend"
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement h5py==1.10.4 (from versions: 2.2.1, 2.3.0b1, 2.3.0, 2.3.1, 2.4.0b1, 2.4.0, 2.5.0, 2.6.0, 2.7.0rc2, 2.7.0, 2.7.1, 2.8.0rc1, 2.8.0, 2.9.0rc1, 2.9.0, 2.10.0)
ERROR: No matching distribution found for h5py==1.10.4
It seems like there is no 1.10.4 version. What should I do?
I have to use python2.7. Also if I just let the python2.7 script run, it works. Only in conjunction with ros I get this error. But I think I take the python version from the same folder.
Thank you
Spyder (4.1) does not work anymore with python 2.7 in Anaconda environnement.
When I launch spyder it does not open and I do not have any message.
If I launch spyder with python 3.8 it works.
conda environment :
What can I do?
Python 2 has officially been retired as one can see in PEP 373, but if it is necessary to use python 2 you could try using an older version of the spyder package. If you wish to use your code in the long-term it is highly advised to migrate necessary to python 3. I hope this helped
I just began to learn Django recently. I am trying to deploy a django project on Google App Engine. But I stuck when following tutorial on google: https://cloud.google.com/python/django/appengine
when I type:
python manage.py makemigration
I got: following error:
mysqlclient 1.3.13 or newer is required; you have 0.9.3.
After short research, apparently, I can't install mysqlclient 1.3.13 on Django 2.2 yet?? Is this a mistake? Am I missing something? Can I use mysqlclient 1.3.13 on django 2.2 ?
Thank you for your time.
Django support for Postgresql is much better than for mysql. I recommend you switching to postgres.
EDIT:
I think that switching to postgres will solve this problem out of the box.
I am running to a weird error. I have only a single installed django version 1.7.11 and when I tested my website to see it is working I ended up having the error:
ImportError at / cannot import name patterns.
I am using 1.7.11 and patterns is supported of that version of Django but here is the weird thing, when I checked the django version on the site where it complained with the error it says:
Django Version: 1.10
Python Version: 2.7.6
However, when I enter the python shell:
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
>>> import django; django.VERSION
(1, 7, 11, 'final', 0)
and I only have a one version of Django installed. Why is this happening?
I am using https://www.pythonanywhere.com to run the django app.
Thanks a lot for the help in advance
I installed python 2.7 and django 1.5 on centos server. I installed cqlengine too but when I want to run my project
This error happen:
can not import model cqlengine
CAn any one help me what shoud I do..
Thanks
You need to upgrade python on your centos box. It looks like you're using python 2.6 on your centos box. Set comprehensions (what's happening in the cqlengine file) were not introduced until python 2.7. That's most likely your problem.