Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
upgrading python package
#1
Hi,

I am new in python and I need please help. I use the python ezdxf package (ezdxf.readthedocs.io), I have installed the 0.8.1 version on my debian oldstable but the ezdxf 0.8.3 already exists, I have to upgrade.

So I did :

root@debian:/home/mojolicious# pip show ezdxf
---
Name: ezdxf
Version: 0.8.1
Location: /usr/local/lib/python2.7/dist-packages
Requires: pyparsing
root@debian:/home/mojolicious# pip install ezdxf --upgrade
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1097, in prepare_files
req_to_install, self.upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 292, in find_requirement
elif is_prerelease(version) and not (self.allow_all_prereleases or req.prereleases):
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 739, in is_prerelease
return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])
TypeError: 'int' object is not iterable

Storing debug log for failure in /root/.pip/pip.log
root@debian:/home/mojolicious#

Can please someone help me ? I don't know what to do....

Best regards,

Amka
Reply
#2
Bug report,it was a Debian bug.
This should be fixed now,upgrade pip.
pip install -U pip
Then version should be 9.0.1 pip -V
pip install -U ezdxf 
Reply
#3
Hi,

Thanks a lot for reply but...

root@debian:/home/mojolicious# pip -V
pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)
root@debian:/home/mojolicious# pip install -U pip
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1097, in prepare_files
req_to_install, self.upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 292, in find_requirement
elif is_prerelease(version) and not (self.allow_all_prereleases or req.prereleases):
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 739, in is_prerelease
return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])
TypeError: 'int' object is not iterable

Storing debug log for failure in /root/.pip/pip.log
root@debian:/home/mojolicious# pip -V
pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)
Reply
#4
Try:
sudo apt-get update
sudo apt-get install python-dev build-essential
sudo apt-get install python-pip
Then:
pip install -U pip

From Python 3 that you should use,look at Linux Python 3 environment.
Reply
#5
Hi,

Unfortunatly nothing new, it says that all is already ok :

One only thing : it says that build-essential (which is then already installed), is "passed into manulay installed".


root@debian:/home/mojolicious# apt-get install python-dev build-essential
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
build-essential est déjà la plus récente version disponible.
build-essential passé en « installé manuellement ».
python-dev est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
root@debian:/home/mojolicious# apt-get install python-pip
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
python-pip est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
root@debian:/home/mojolicious# pip install -U pip
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1097, in prepare_files
req_to_install, self.upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 292, in find_requirement
elif is_prerelease(version) and not (self.allow_all_prereleases or req.prereleases):
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 739, in is_prerelease
return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])
TypeError: 'int' object is not iterable

Storing debug log for failure in /root/.pip/pip.log
root@debian:/home/mojolicious#
Reply
#6
Your old pip version can be broken.
Try with older easy_install to upgrade pip.
easy_install -U pip
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to run utilities from a Python package? LugosisGhost 1 389 Dec-27-2023, 12:00 PM
Last Post: Larz60+
  Python package not seen in VSCode fmccabe80 6 3,080 Mar-06-2023, 10:01 PM
Last Post: fmccabe80
  Upgrading from 2 to 3 and having file write problems KenHorse 2 1,430 May-08-2022, 09:47 PM
Last Post: KenHorse
  Math Package in python Uma 1 1,462 Dec-12-2021, 02:01 PM
Last Post: jefsummers
  Virtual environment and upgrading python 3.5 to 3.9 NeilUK 4 11,972 Jan-24-2021, 01:02 PM
Last Post: snippsat
  Python IDE doesn't see opencv-python package on my Jetson Nano sadhaonnisa 1 3,290 Oct-11-2020, 01:04 AM
Last Post: Larz60+
  Error in Mysql Client when upgrading Django Abi 0 1,850 Sep-21-2020, 06:11 AM
Last Post: Abi
  Help needed for a python package keysson 1 2,175 Sep-02-2020, 03:37 AM
Last Post: Larz60+
  Installing a python package using pip anthonymoss78 0 1,776 Jul-14-2020, 01:52 PM
Last Post: anthonymoss78
  Python package as installable Prabakaran141 0 1,468 Mar-10-2020, 10:07 AM
Last Post: Prabakaran141

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020