I accidentally did a system-wide install of flask and sqlalchemy. I "sudo pip install"ed both of them, and now I'm wondering how i can uninstall both of those off my system. I already have virtualenv all set up, so I don't want flask or sqlalchemy attached to my system. I read that having it directly installed can cause problems when working with different frameworks and different versions of a framework.
Is it a problem that I did a system-wide install of these packages?
sudo pip uninstall flask should do the trick. And yes, having it installed globally can cause issues if you're working with different versions of other packages.
Related
I'm on Ubuntu 22.04. On a default install there is no python version.
I've installed pyenv in order to use specific python-based programs.
Some of the programs I want to install have dependencies that are usually installed using pip. However, because there is no system python on-board, there is no pip.
Now, I could go and install system python, in which case I'd have access to pip... and also install python3 in order to use install python3 deps. But this seems like overkill to me. And for all I know, I might be creating complications that hit me further down the road.
So how do I do dependency management when using managed python versions?
I am working on project which use django as main project library. I faced with a need to install for this project new module django-inspect-model and django-inspect after playing with both i understood that these modules aren't appropriate solutions for me and i uninstall them by
pip uninstall django-inspect-model
I don't remember but when i was installing one of these modules i saw in console message about compatibility with my django version but i didnt pay attention for it. Because module was succesfully installed and after deinstallation both of them i tried to run
python manage.py shell
which didn't run and printed in console that some of my installed modules imporerly configured for example celery. After googling message about error i understand that this kind of errors rise due to incompatibility with django and i decided to check my django version by
python -c "import django;print(django.__version__)"
Which promted me that installed django version is 1.8.6 but i exactly knew that before above described actions my django's version was 2.2.0
After checking of my requirements.txt file there isn't a doubt that installed django version was 2.2.0. How it's possible that installed module can switch django on lowest version than it was? Is here anyone who faced with the same situation ? What if i only upgrade my project installed modules (django too) using the same requirements.txt? I am afraid that my actions can broke my whole project
While installing some packages, Django switches to lower versions due to compatibility issues. In case you want the previous version back, you need to upgrade your Django with the following command:
python -m pip install -U Django
or
pip install --upgrade django
I want to deploy a python flask app using Amazon’s Elastic Beanstalk.
Therefore, I want to use virtualenv to make sure to get the right packages.
However, one package (docx) isn't available through pip and I'd like to install it manually.
If I do install it manually via python setup.py install the installation works, but the package screws up lxml dependencies.
Do I need the virtualenv in the first place, or can I also just log into the amazon console and install all packages manually?
I'm running a Mac at home, and linux on amazon's S3 server, so can building the package on my Mac (I think some c-code is compiled) work anyway?
If you do recommend to still use virtualenv, any idea of how to resolve the screwed up library issue above?
(if I am outside of the virtualenv and use conda install lxml, I'm good. But inside of virtualenv, conda install lxml will not install lxml for some reason, import lxml gives an error that the library isn't found.
I'd appreciate your input.
I don't know what I have did but now when use pip to install a package it install it for python 3 (python3.3 folder) not for python2.7.
Another problem I installed django_debug_toolbar and now my django version is 1.6.4 not 1.3 I installed.
Now I can't remove django 1.6.4 with pip. Do you have a solution?
Learn using virtualenv. It allows you to have different environments with isolated version of Python and set of installed packages. Each created virtual environment is by default having pip installed.
You messed up things (as you know very well) as you probably reinstalled pip for another version of Python.
You might find more versions of pip in your system. Check the version of python they use (on Linux watch the shebang on first line). Use explicit path to proper pip to manage packages for related Python.
Often people install pip and rename it or give an alias - names like pip33 or pip27.
Note, that virtualenv allows creation of different environments (with different Python versions) without need to install virutalenv for each of these Pythons.
With virtualenv I would also highly recommend using virtualenvwrapper which adds a few very handy commands.
My problem came when I installed django_debug_toolbar. when I pip-installed django-debug-toolbar, the latest version of Django was installed automatically.
Hello I recently installed Eve using pip3 install eve. But now I am having import problems. After installing eve from pip3. I can't import it. I tried it with Python3.3 and with Python2.7. When I try:
from eve import Eve
I get back Module not found error. Can you help me on this?
Are you using virtualenv? You probably should as it allows to you to isolate your Eve (or whatever) environment from others, and avoid conflicts in the process.
This said, installing Eve is as simple as hitting pip install eve(from inside the virtual environment if you're using virtualenv).
Try issuing a pip freeze, it will list the installed packages. Compare the list with Eve dependencies and make sure they have all been installed (you can use requirements.txt for comparison).
EDIT: you might also be facing privilege issues. Try installing with sudo pip install eve. But again, you should really be using virtualenv.
Good luck!