Cannot find packages installed with pip - python

I'm using Mac OS X 10.6.8 and python 2.7.3. I'm trying to use pip to install ipython, and running sudo pip install ipython installs successfully, but when I try to run ipython I get "command not found". I cannot find where pip installs packages, or why it's not linking correctly. I'm very new with this, please help!

I had this problem and fixed it by restarting my terminal.

For me, on an OS X 10.5, the default installation of Python is soft-linked to /Library/Frameworks/Python.framework/Versions/Current/, and ipython is at /Library/Frameworks/Python.framework/Versions/Current/bin/ipython. Make sure the bin directory it's sitting in is in your shell PATH. Type:
$ export PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:$PATH
, then try running ipython. If that works, edit your ~/.profile to update your PATH permanently.

I fixed this problem by using sudo. sudo will install the ipython in system folder.
pip uninstall ipython
and than
sudo pip install ipython

Similar to acjay, for me worked with:
/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/
adding to path (10.12 Sierra).

Related

How to fix "Python quit unexpectedly" when trying to install a module through pip install? Terminal Crashes with message "zsh: abort"

I think I broke my terminal. For some reason I am unable to use pip install to install anything on my Macbook Pro.
When I try to install such as
pip install Flask
I get
zsh: abort pip install Flask
I've tried both on pip and pip, but I get the same error on both.
Now I am unable to install any python module. I thought it was due to Bash -> zsh from Catalina update but when I changed it to Bash and tried the same, I get the same result.
Any idea how I can fix this? I am unable to do any python work due to needed modules unable to being install now
setting DYLD_LIBRARY_PATH before installing any packages with pip solved the issue for me:
export DYLD_LIBRARY_PATH=/usr/local/Cellar/openssl/1.0.2t/lib
(adjust for a valid openssl path in your system)
I found the solution in this github issue.

Unable to install LIbraries for Python3.6.5

I had pyhton2.7 and Python3.5 in my laptop but to use f string, I installed pyhton3.6.5 and removed python3.5. Now I have python2.7 and Python3.6.5. But I am not able to install any libraries for the python3.6.5
I have tried this but it doesn't works
Please let me know how can I install modules for the python3.6.5
Try this
sudo python3.6 -m pip install [Package_to_install]
I hope it will work.
Check the installation in your system, if there are several python3 installs in your system it might be an issue.
Either uninstall the other version of python3 or create a virtual environment and then install the library.
Check the description at https://www.alexkras.com/how-to-use-virtualenv-in-python-to-install-packages-locally/

bash: virtualenv: command not found "ON Linux"

I am using a form of Lubuntu called GalliumOS (optimized for Chromebooks). I installed pip using $ sudo apt-get install python-pip. I then used pip install --user virtualenv and pip install virtualenv, and then when I tried to subsequently use virtualenv venv I experienced the message bash: virtualenv: command not found.
Between the pip installs above, I used pip uninstall virtualenv to get back to square one. The error remained after a reinstall.
I read several other posts, but all of them seemed to deal with similar problems on MacOS. One that came close was installing python pip and virtualenv simultaneously. Since I had already installed pip, I didn't think that these quite applied to my issue. Why is pip install virtualenv not working this way on LUbuntu / GalliumOS?
Are you sure pip install is "failing"? To me, it sounds like the directory to which pip is installing modules on your machine is not in your PATH environment variable, so when virtualenv is installed, your computer has no idea where to find it when you just type in virtualenv.
Find where pip is installing things on your computer, and then check if the directory where the pyenv executable is placed is in your PATH variable (e.g. by doing echo $PATH to print your PATH variable). If it's not, you need to update your PATH variable by adding the following to your .bashrc or .bash_profile or etc.:
export PATH="PATH_TO_WHERE_PIP_PUTS_EXECUTABLES:$PATH"
What finally worked for me was this. I used
$ sudo apt-get install python-virtualenv.
I was then able to create a virtual environment using $ virtualenv venv.
I was seeking to avoid using $ sudo pip install virtualenv, because of admonitions in other posts to not do this, and agreed, because of experiences I'd had with subsequent difficulties when doing this.
pip install virtualenv
This command worked for me for. This problem that raised to me on Kali Linux.

Uninstall Python package using pip3

I am working with Python 3.4 and have installed a package (spyder) using pip3 install. It is works as it should and I can start it from the terminal.
Since I want to switch my IDE, I tried to uninstall it using pip3 uninstall in the same way as the installation. But this gives me a message that no files can be found.
Here's my terminal output:
cord#laptop:~$ sudo pip3 freeze
Coopr==3.5.8748
...
spyder==2.3.4
...
xdiagnose==3.6.3build2
xkit==0.0.0
cord#laptop:~$ sudo pip3 uninstall spyder
Can't uninstall 'spyder'. No files were found to uninstall.
My OS is Ubuntu 14.04 x64.
Any hints?
Go to /usr/local/bin and find the packages you want to delete
Then just use sudo rm -r spyder or whatever the directory name is.
That way the files get manually removed from your system.

Did I install pip correctly?

I'm new to python and the tutorial I'm using suggested for me to install four important packages (distribute, pip, nose and virtual env).
I've installed the first two using setup.py in Windows PowerShell
Problem is I can't figure out how to use pip. I've tried doing commands for pip in the cmd, python idle shell and powershell. All of them return something similar to pip is not defined or there is a syntax error
Here's what i type which results to syntax error
pip freeze
pip list --outdated
Anyone know if I've done something wrong installing pip?
Notes:
I'm using Windows 7
I've checked the Python2.7 directory and pip is in the Scripts folder.
I've also used help("modules") in the Python Idle shell and it lists pip in the modules
To add an answer to this question (it was provided in the comments by Joran Beasley), the issue here was that pip installs to the python/Scipts directory, but that was not in the path by default on Windows. Adding C:\Python27\Scripts to the path fixed the issue. This answer describes adding a directory to the path on Windows 7.
if you've ubuntu you have just to install the pip with aptget
sudo apt-get install python-pip

Categories

Resources