I was asked to fix an old installation of a Django App
I was going through the package dependencies and saw that during a server change they probably lost some python modules:
Installed is:
Python 2.7.5 and Django (1.8)
pip 8.1.2
edit: django-mptt 0.9.1
I need to install django-mptt-admin
but I get this error when doing pip install django-mptt-admin:
...
Collecting Django>=1.11 (from django-mptt->django-mptt-admin==0.5.8)
Using cached https://files.pythonhosted.org/packages/7e/ae/29c28f6afddae0e305326078f31372f03d7f2e6d6210c9963843196ce67e/Django-2.1.7.tar.gz
Complete output from command python setup.py egg_info:
==========================
Unsupported Python version
==========================
This version of Django requires Python 3.5, but you're trying to
install it on Python 2.7.
This may be because you are using a version of pip that doesn't
understand the python_requires classifier. Make sure you
have pip >= 9.0 and setuptools >= 24.2, then try again:
the question is now:
How can I find the right version of django-mptt-admin and save myself the problem of upragding all python, django and their dependencies?
Its a non documented app which probably has some more problems in it
In tried
pip install django-mptt-admin==0.2.1 (from 0.5.8 down to 0.2.1) but always with the same error.
I think you install django-mptt as dependency for django-mptt-admin. And there in dependencies is Django>=1.11. You must fix version of django-mptt-admin and django-mptt for both.
Why don't you check the release history?
https://pypi.org/project/django-mptt-admin/#history
Related
I try to install tensorflow==1.1.0 for Python2.7 with pip package manager but am getting the following error when I run the command pip install tensorflow:
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 pip.pypa.io/en/latest/development/release-process/… pip 21.0 will remove support for this functionality.
ERROR: Could not find a version that satisfies the requirement tensorflow==1.1.0 (from versions: none)
ERROR: No matching distribution found for tensorflow==1.1.0
How else can I install tensorflow for Python2.7?
Thank you!
You could use a ready to use Docker image.
https://hub.docker.com/r/tensorflow/tensorflow/tags?page=1&name=1.1.0
The tags with the postfix ”py3“ indicate using Python 3.x while the ones without this postfix are using Python 2.7.
Here some additional information about the Docker images. https://hub.docker.com/r/tensorflow/tensorflow/
Dockerfiles for TF 1.1.0 https://github.com/tensorflow/tensorflow/tree/v1.1.0/tensorflow/tools/docker
We have some issues deploying our GCP Dataflow pipeline. After some analysis, found that the latest version of apache-beam has some issues while installing. To replicate the issue I created a virtualenv and ran the below
pip install apache-beam==2.32.0
Below errors started to pop while installing the 'orjson' dependency,
Using cached orjson-3.6.3.tar.gz (548 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'c:\temp\virtu\scripts\python.exe' 'c:\temp\virtu\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\prasasaw\AppData\Local\Temp\tmpmekx1jjj'
cwd: C:\Users\prasasaw\AppData\Local\Temp\pip-install-0yofoe55\orjson_62f1ca2674934a7f8c45b08e87e05a4b
Complete output (6 lines):
Cargo, the Rust package manager, is not installed or is not on PATH.
This package requires Rust and Cargo to compile extensions. Install it through
the system's package manager or via https://rustup.rs/
Note that the previous versions of Apache beam like 2.30.0 does not have the dependency on 'orjson' and it works just fine when you do
pip install apache-beam==2.30.0
I tried to install RUST but it failed for some 'pysam' dependency. So would like to know what is the correct way to install the 'orjson' dependency
I saw this GitHub issue for orjson installation but could not find much from it.
https://github.com/readthedocs/readthedocs.org/issues/7687
//Prasad.
I'm a bit late to the party, but I ran into this issue as well today. I solved it by switching to a 64-bit Python environment (I accidently installed 32-bit).
The orjson dependency was introduced in https://github.com/apache/beam/pull/14690/files. According to the comment: orjson, only available on Python 3.6 and above. You may want to check your python version.
According to the orjson docs, you need to upgrade pip to be above 20.3:
pip install --upgrade "pip>=20.3" # manylinux_x_y, universal2 wheel support
pip install --upgrade orjson
(docs)
I used pip install -r requirements.txt, and got this error:
AttributeError: module 'msgpack' has no attribute 'dumps'
Full log: https://pastebin.com/aTTwyrML
requirements.txt: https://github.com/poljar/weechat-matrix/blob/master/requirements.txt
This also seems to break other uses of pip install.
I can't find any pip issues or solutions to this anywhere.
EDIT: msgpack is being inmported from: '/usr/lib/python3.8/site-packages/msgpack/__init__.py'
Other packages that cause the error:
pytconf
You're running python version 3.8 and msgpack only supports up to 3.7. This might be causing a problem installing msgpack via pip or there's some breaking implementation in 3.8 that's not in 3.7 and under. I know I've run into some trouble with sharing projects between teams that are using 3.8 and teams that are using earlier verions.
msgpack on pypi.
I want to accelerate downloading Python packages with PyPi mirrors(our company mirror), but the pip can't select correct iPython version from mirrors. I guess the problem maybe has relation with PyPi index database. If someone know anything about that problem, welcome to tell me.
Python version:
(p2) ➜ /tmp python --version
Python 2.7.13
Here is my ~/.pip/pip.conf
[global]
index-url = http://mirrors.company.com/pypi/simple/
trusted-host=mirrors.company.com
The following error message was print when I used pip install ipython
(p2) ➜ /tmp pip install ipython
Collecting ipython
Downloading http://mirrors.aliyun.com/pypi/packages/79/63/b671fc2bf0051739e87a7478a207bbeb45cfae3c328d38ccdd063d9e0074/ipython-6.1.0.tar.gz (5.1MB)
100% |████████████████████████████████| 5.1MB 7.6MB/s
Complete output from command python setup.py egg_info:
IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2.
When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
Beginning with IPython 6.0, Python 3.3 and above is required.
See IPython `README.rst` file for more information:
https://github.com/ipython/ipython/blob/master/README.rst
Python sys.version_info(major=2, minor=7, micro=13, releaselevel='final', serial=0) detected.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/6c/gbrkbbzd4gvdp56x7x8s6xpw0000gn/T/pip-build-FVITyR/ipython/
Your Proxy/Mirror does not implement pep503 correctly and your pip may be is out of date (you need pip 9.0.1+). Since December 2016 PyPI has been fixed to correctly expose extra metadata telling Pip with which Python version a package is compatible (My talk at PyCon , and PyBay this year about this).
To be sure, check this page on PyPI, you can see in the source the link of IPython 6.0.0:
<a data-requires-python=">=3.3" href="../../packages/.../ipython-6.0.0.tar.gz" >ipython-6.0.0.tar.gz</a><br/>
Now check the same page on your mirror... it is missing the data-requires-python=">=3.3" field, so pip cannot know IPython 6.0 is incompatible. I would suggest to contact the people running the mirror to update it.
Also please setup your mirror to only allow https, or you will be unsure that what you are downloading has not been tampered with !
I have been attempting to upgrade argparse on Ubuntu 16.04 to the latest version, but pip keeps saying that it is part of the standard library.
How can this package be upgraded?
$ sudo pip install argparse --upgrade
Collecting argparse
Using cached argparse-1.4.0-py2.py3-none-any.whl
Installing collected packages: argparse
Found existing installation: argparse 1.2.1
Not uninstalling argparse at /usr/lib/python2.7, as it is in the standard library.
Successfully installed argparse-1.2.1
Thanks.
Argparse is maintained as a separate package here: https://pypi.python.org/pypi/argparse
Which is where pip is going to collect it.
But
As of Python >= 2.7 and >= 3.2, the argparse module is maintained
within the Python standard library. For users who still need to
support Python < 2.7 or < 3.2, it is also provided as a separate
package....
So, you are getting the error because it is part of the standard library, but also available to install via pip if you are using a version of Python for which it isn't.
If you really need to install 1.4.0 try this: (worked for me on my Windows 2.7.11 install)
Download the gzip file, not the wheel, from the pypi downloads page
Uncompress the archive and open a terminal in the argparse-1.4.01 folder
Run python setup.py install (See the 'Install' section of first link)
And check you now have the correct version (hopefully):
>>> import argparse
>>> argparse.__version__
'1.4.0'
Note:
This still leaves the original argparse.py (in ...Python27\Lib for me) intact, and places the 1.4.0 egg in site-packages, with an easy-install.pth file which I presume ensures that this version gets used in preference to the standard library one.