Should python "pip" always be up to date on latest version? [closed] - python

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
Using machine learning models always come with some dependicies like framework or library verison conflicts. And pip verison as getting up, installing some libraries could be suck. What is your pip version? Do you upgrade it always?

It is quite ok if the version is not updated to the latest on every single release.
You will hardly get any problems even if you update the pip every 3 to 4 months.
However I recommend that you should update the pip every month or at least when a major update comes.
For Linux users, If you have a habit of updating your system every month than you should not worry about this explicitly.

first of all, there is no dependency management with pip. Most people use conda as a package manager for python because it automatically checks for dependency compatibility. If you use pip as a package manager you have to do all that yourself which is difficult if not impossible unless you have a ton of sys-admin experience. If you are running into dependency issues I strongly recommend downloading anaconda and using conda package manager. It will make your life a lot easier. cheers.

Related

How to install a zip package in Pycharm [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I am using Pycharm IDE. I am doing a project that requires an older version of Tensorflow. I tried installing in from within pycharm marketplace using specified versions, but it says that there is no matching distributions found. So, I downloaded Tensorflow v1.8 sourcecode from Github as a zip. Now I want to install it in pycharm. How do I do that?
Having an IDE with things like a 'marketplace' is nice in theory, but you'll always end up having to resort to the commandline. Try to open the Terminal in PyCharm, it should activate with the python environment of your project. Then install tensorflow 1.8 with pip install tensorflow==1.8.0
For the latest version
pip install tensorflow
For the previous ones
pip install tensorflow==THE VERSION YOU WANT
pip install tensorflow==1.5
Or with pyCharm
Preferences> Project: PROJECT NAME> Python interpreter
Click on the + symbol at the top left and look for the package you want to install
(At the bottom right you can also check the Specify version box and choose the version you prefer)

Why can't I download swiglpk and how can I fix it? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
This is the error that i got
I don't even know what went wrong. I'm new to programming and I need this package (pymIprog) for a college assignement
You are doing a pip install in a Python 3.9 environment. I can't get that to work either: it fails trying to install swiglpk. But it does work in Python 3.8 and Python 3.7.
I can't tell you how to fix it: only the packagers of swiglpk can do that. But to get going, you could download Python 3.8, which will coexist nicely with Python 3.9, and work from there.
Python 3.9 only came out quite recently and some packagers take a while to catch up with new releases.
To be sure of running the right version of pip, begin by doing pip --version and if it is not the version you expect, run your pip command from C:\Program Files\Python38\Scripts.

Dealing with module dependency troubles [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am trying to install lightgbm using conda. I successfully downloaded the only version I saw on the cloud(2.2.1) and saw that it forced me to downgrade my mkl. I thought this would be ok, however, when I did this, it broke some other essential functionality (a matplotlib function stopped working).
I was wondering how I might resolve this issue? Also is there a general strategy people tend to use when dealing with this whack-a-mole type dependency problem? Is there something simple that can be done to handle this? Thanks in advance!
The general strategy people use for this problem is working with different environments. When you use different environments for projects, you can install packages for each project you work on seperately, and you will not get into trouble with packages not working anymore for your other projects. It works pretty simple and avoids dependency problems.
To create a new environment use: conda create --name env_name python=requiredpythonversion
Then you should activate your newly created environment: activate env_name
After which you can install to it the packages your project requires: conda install PACKAGENAME, in your case that would be conda install lightgbm
A great tutorial on how to work with python environments using conda (You could also use pip and venv's, but since you seem to be using conda already I assume you want to proceed with that), can be found Here. I recommend you follow it, it will probably answer all the remaining questions you have about package management, and then you will be good to go =)

How to specify dependencies in Python [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I came across a python library which has docs, which start like this:
Quickstart
Include foolib in your requirements.txt file.
AFAIK dependencies should be specified via install_requires in setup.py.
Should I talk the maintainer of the library and create a pull-request for the docs?
Both are acceptable. The difference is that specifying something in your install_requires will auto-download / install that package when you install the package using setup.py. Having a requirements.txt makes it easier to see at a glance what the requirements are. I personally prefer seeing libraries with a requirements.txt, since I can install all those requirements with pip into my virtualenv and be able to update them quickly if needed.
Add your dependencies in a requirements file and then parse this file in the setup.py. This will help you to:
Easily install dependencies without installing the entire package through pip
Get only one source for your dependencies
Get all way to install your package available (pip, easy_install, command line, etc...)

Mercurial and python 2.6 [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I try to install mercurial on a centos vps-server with "yum install mercurial" but it says it needs python2.4 in order to install it. I have python2.6 installed. Is there a way to get past this?
You should not have messed with your system Python --
it is incrdible you can still login at all. Python 2.4 is ancient, but it is what is used in a lot of CentOS versions in the wild - what is installed by it's package management. Maybe you had installed a ",meta package" taht upgrades the system Python to 2.6, along with everything that depends on it (yum included).
Anyway, 2.4 would be sub-optimal to install mercurial.
Since your system is a mess already, you can simply easy_install mercurial into your system Python instead of trying to use yum for it.
"sudo easy_install mercurial" -- if you don't have easy_install, try "yum install setuptools" first. If this does not work, search on pipy.python.org for setuptools, install it manually - -and think seriously on rebuilding this machinne - you will have to do it soon.

Categories

Resources