Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pip and setup script
#11
Only problem I've had with pip on Windows (10) was I downloaded and installed Numpy & Scipy wheels from Gohlke.  Later, pip told me there was a newer version of Numpy, so I did the 'pip install --upgrade numpy' and all went well.  Later pip told me Scipy was outdated.  Went to Gohlke, got the new version and installed it, and all went well...until I did a 'import scipy', then I got an error message that it couldn't find 'numpy+mlk'.  Ended up downloading the newer version of Numpy from Gohlke and installing it.  Now both Numpy and Scipy work.

Moral of the story: "If you download it from Gohlke, upgrade it from Gohlke, not pip"

My problem with linux is, Python is so imbedded in the OS, and many of the librarys are customized to work with that particular OS. It makes me very reluctant to 'upgrade' an outdated one.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#12
Quote:Only problem I've had with pip on Windows (10) was I downloaded and installed Numpy & Scipy wheels from Gohlke.
pip has many features that may be not so known Undecided 

Here Numpy working in about 30-sec.
No search at Gohlke or download from web,pip dos it all.
C:\                                                                                                
λ virtualenv numpy_test                                                                            
Using base prefix 'C:\\Python34'                                                                   
New python executable in numpy_test\Scripts\python.exe                                             
Installing setuptools, pip, wheel...done.                                                          
                                                                                  
C:\numpy_test                                                                                      
λ cd scripts                                                                                       
                                                                                                   
C:\numpy_test\Scripts                                                                              
λ activate                                                                                         
(numpy_test) C:\numpy_test\Scripts 
                                                                
λ pip install --use-wheel numpy                                                                    
Collecting numpy                                                                                   
  Downloading numpy-1.11.2-cp34-none-win32.whl (6.5MB)                                             
    100% |################################| 6.5MB 77kB/s                                           
Installing collected packages: numpy                                                               
Successfully installed numpy-1.11.2                                                                
           
(numpy_test) C:\numpy_test\Scripts                                                                 
λ python                                                                                           
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct  6 2014, 22:15:05) [MSC v.1600 32 bit (Intel)] on win32     
Type "help", "copyright", "credits" or "license" for more information.                             
>>> import numpy                                                                                   
>>> numpy.__version__                                                                              
'1.11.2'                                                                                           
>>>
I have help many who has been struggled for days to install Numpy on Windows.
Maybe the pip documentation could be clearer,
it's really big because there are so many option(which can be confusing) Doh
Reply
#13
(Oct-25-2016, 09:26 PM)sparkz_alot Wrote: My problem with linux is, Python is so imbedded in the OS, and many of the librarys are customized to work with that particular OS. It makes me very reluctant to 'upgrade' an outdated one.
Uh? Examples?
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply
#14
Sure, first I'm using openSuse (Leap). Here's a small example:

Output:
> pip list --outdated bottle (0.12.9) - Latest: 0.12.10 [sdist] coverage (4.0.3) - Latest: 4.2 [sdist] pycups (1.9.72) - Latest: 1.9.73 [sdist] pycurl (7.19.5.1) - Latest: 7.43.0 [sdist] pythondialog (3.3.0) - Latest: 3.4.0 [sdist] simplejson (3.8.1) - Latest: 3.9.0 [sdist]
These are 'pre-packaged' modules either included or installed using openSuse's package manager(either zypper or Yast). I presume they are 'packages' that were somehow modified to work with OS's architecture. An example, I just did the upgrade for 'pythondialog' and pip reports it was successful, however, if I try to import dialog, I get an error saying it can't be found. Even though it is located in /usr/lib/python3.4/site-packages:

Output:
> locate pythondialog /usr/lib/python3.4/site-packages/pythondialog-3.4.0-py3.4.egg-info /usr/lib/python3.4/site-packages/pythondialog-3.4.0-py3.4.egg-info/PKG-INFO /usr/lib/python3.4/site-packages/pythondialog-3.4.0-py3.4.egg-info/SOURCES.txt /usr/lib/python3.4/site-packages/pythondialog-3.4.0-py3.4.egg-info/dependency_links.txt /usr/lib/python3.4/site-packages/pythondialog-3.4.0-py3.4.egg-info/installed-files.txt /usr/lib/python3.4/site-packages/pythondialog-3.4.0-py3.4.egg-info/top_level.txt
I don't know why they do what they do, perhaps in the way they are compiled? I don't know, and to be honest don't care. I've learned to stay away from those marked with [sdist] or look for an updated package.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#15
you can use pip install pkg_name --upgrade

or to upgrade all, from python run this script (use #373)
Reply


Forum Jump:

User Panel Messages

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