I have a very basic question. I want to install a new module on my computer in order to use it in Python (via Spyder). When I install the package via pip everything seems to work fine. When I want to import the package in my script it says that there is no module by that name (see scrennshot below)
Any suggestions what might be the problem?
Thanks a lot :)
screenshot of this problem
You're using pip3 to install.
Try installing using pip install nibabel.
Failing that, I would refer you to the following question:
Which pip is with which python?
This is a common pitfall of using different versions of Python and pip.
I think
/Applications/Spyder.app/Contents/MacOS/python -m pip install nibabel
or
/Applications/Spyder.app/Contents/MacOS/python -m pip3 install nibabel
will solve your problem
Thanks for asking the question.
Have tried conda install
Since we are in anaconda dev env.
If you are using windows
Windows: Click Start, search, or select Anaconda Prompt from the menu
and use that terminal
please find the reference
https://docs.anaconda.com/anaconda/install/verify-install/
Related
I have recently uninstalled python 3.7 and installed python 3.9. After that, when I try to use pip to install any package, it keeps trying to use python37.exe, which is not installed anymore. I was able to solve that by using python -m pip install, but the same does not work when I try to launch jupyter notebook, which still tries to use python37. I cannot launch it using a similar command python -m jupyter notebook.
I was wondering if there is any solution to this, since I could not find anything related to that.
Thanks in advance.
Maybe try to install it again using your new pip like
pip install notebook
(Sorry not enough reputation for a comment)
This usually occurs when jupyter is installed with a specific version of python. The easiest / best solution is to uninstall jupyter, then reinstall it with the correct version of python.
In your case, you should consider using python3.9 -m pip install jupyter (after first uninstalling jupyter).
Just to give you all an update in case anyone is facing the same problem.
I was able to find some remaining files and files of the previous installation of Python 3.7 in my system that were not deleted for some reason during the uninstall process. I deleted them manually and my system started to recognize Python 3.9 to call pip and jupyter after that.
I'm a little lost on how to get pyodbc installed in my computer.
I have python 3.6.1
The link
http://support.esri.com/en/technical-article/000011656
pointed me to another link
https://github.com/mkleehammer/pyodbc
Which is vague.
I'm used to downloading and running an exe for install.
This link is unclear and says all I have to do is:
"pip install pyodbc"
What exactly do I need to do to get this working?
Since you have not mentioned which OS you are using,
I will assume that you are on windows (as you have mentioned that you are used to install using .exe).
Firstly you need to know what a pip is:
pip is basically a package manager for python packages used to install 3 rd party packages which do not bundle along with the python distribution.
On linux pip comes pre installed also if you are using python version 3.4 onwards or python 2.7.9 you will be having pip pre installed on your system.
All you have to do it to open the command prompt issue the command
pip install package-name(pyobdc here)
it will do the job.
If you do not find pip in your distribution you can refer this link
How do I install pip on Windows?
open cmd in your computer and type
pip install pyobdc
Hello there and welcome to python programming. Basically python comes with its package installer so either you can go to any interpreter that you are using and type pip install pyobdc or use the command prompt in windows and type in pip install pyobdc. This would install your module and just remember to put import pyobdc at the top of the code if you want to use this package. Further information can be found on here
I am trying to install a lxml file but I am getting several errors. Most notable when I enter the command:
python lxml.py install
I get two error messages as shown in image
When I try addressing for that problem and manually type the command
python -m pip install lxml-3.6.0-cp35-cp35m-win32.whl
I am introduced to the error as shown in the image:
Would anyone have advice on how to work with this? I have this 1xm1-3.6. file manually installed but I feel that I am inexperienced on how to use that to be manually installed into the python directory. Any advice would be greatly appreciated.
So, the solution to my problem is as follows:
1- I installed mingw installation manager and downloaded the corresponding packages
2- Afterwards I ran python -m pip install lxml-3.6.0-cp35-cp35m-win32.whl which worked. Thanks to minGW.
3- I then ran python -m pip install pptx
and that was the solution to my problem. I hope this helped anyone who would have the following problems.
I'm trying to install a charting tool (matplotlib-v1.4.2) for python 3.4 in Windows 7, so far all my trails doesn't seem to do the job.
Attempts:
I've downloaded pip from GitHub
python -m pip install matplotlib on Command Prompt[DOS] - No Use
There's a similar question posted here, tried these suggestions too but I get the following error
'$' is not reconginized as an internal or external command.
I'm sure I'm missing something, your step by step guidance on this regard would be much appreciated.
The $ refers to the beginning of a shell prompt, you shouldn't actually include it in your command :)
So rather than (from the example question you posted)
$ pip install requests
you actually type
pip install requests
In any case, you can download matplotlib .exe files from here for use in Windows. Make sure you get the correct bitness (32bit vs 64bit) and the correct Python version.
$ in the example signifies the linux prompt, which in windows is usually >
You can install the library by either using pip install, or using this link http://matplotlib.org/downloads.html
Additionally, most python packages for windows can be easily installed by using the installers from this site http://www.lfd.uci.edu/~gohlke/pythonlibs/
I recently installed python 2.7.2 on my Mac running OSX 10.6.8. Previously, I had version 2.6. I set my path in .bash_profile as follows:
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/share/python:$PATH
so that when I run python it will refer to my new installation. It does.
I would also like to use pip with my new installation, but the problem is that I already have the current version of pip installed at
/usr/local/bin/pip.
I tried to re-install pip with:
easy_install pip
But, of course this does not put pip in the desired new directory
/usr/local/share/python/pip
but simply refers to the existing version in /usr/local/bin/pip.
Can someone tell me how to fix this?
I would like to then use pip to install NumPy and SciPy in the correct directory (I was having trouble getting the SciPy installation to work with my old version of python, hence the new install).
If you'd like, you can visit the website where I found instructions for installing python 2.7, creating/updating my .bash_profile, installing pip, and NumPy and SciPy. Might provide some insight, or I'm happy to give more details if needed. Thanks!
http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/#python
Install distribute as per the instructions at http://pypi.python.org/pypi/distribute .
Make sure you specify the full path to the python executable (/usr/local/share/python/python or smth in your case).
$ curl -O https://svn.apache.org/repos/asf/oodt/tools/oodtsite.publisher/trunk/distribute_setup.py
$ /usr/local/share/python/python distribute_setup.py
Then you should have /usr/local/share/python/easy_install.
After that, run:
$ /usr/local/share/python/easy_install pip
Then you should have /usr/local/share/python/pip.
Depending on the ordering of things in your PATH, either your old, or the newly installed pip is executed when you execute the pip command, so you either might have to adapt your PATH, or specify the full path to /usr/local/share/python/pip when installing eggs.
(shameless plug:
In any case, you might consider using virtualenv for installing packages into a "project" specific isolated environment, as opposed to installing them globally.)
I needed to uninstall brew's python.
Then, I was left with python v2.7.6
Next to install, pip I ran
sudo easy_install pip
installed fine and working
I had a similar issue, try this:
$ python -m pip install --upgrade --force-reinstall pip
This will force reinstall pip with whatever version of python you use including installing the binary.
A few days ago I had a friend who was starting Python Programming and needed help with the same issue: installing pip. There are debates over which one to choose between easy_install and pip and it seems everybody is heading the pip direction. Either way, installing either of them can be frustrating.
You can use this simple tutorial : installing pip package manager the easy way
Here are what you should keep in mind as you follow the above guide:
If you already have an older version installed, uninstall it or totally remove the python installation
Once that is cleared, download an install Python.
After that, download ez_setup.py file and save it to your desktop - easily accessible from the command line
Now run it from the command line and it will install easy_install for you after which,
You can use it to install pip.
Once again, you can do this or use the above link to find a simple step-by-step guide on how to get it installed on your computer.
Good luck.
Just so that people knew, ATM we can install PIP by downloading get-pip.py from the page with docs and run it like this:
c:\python27\python.exe get-pip.py
BTW, Python 3.4 comes with PIP pre-installed.
One of the command line options lets you choose where to install to.
--install-dir (-d) install package to DIR
So something like - # easy_install pip -d /usr/local/share/python
(Please correct me if I'm wrong.)
Just wanted to say that I found a way to get around my problem. I don't know that I can explain it perfectly, since I am not very good at understanding what I am doing with this stuff just yet! But, the problem seems to have been with my PATH. I removed the PATH that I posted in my original question, and then used easy_install pip. It went straight to python 2.7.2 (my new version) with no problem. I then successfully used pip to install NumPy and SciPy in the correct location, and they both work. Thanks to ErikAllik and FakeRainBrigand for taking the time to look into it!