I installed pip and installed python for terminal use for a previous course. The course I am currently in, specified I install Anaconda. I installed Anaconda and when using JupyterLab for python and plotly, I installed the plotly-geo package. It says it is not installed though and when I try to install again it says it is installed.
Is it because I installed pip python prior? How would I remove all of pip and reinstall it for Anaconda?
Traceback (most recent call last):
File "./Desktop/Data_Visualization/p3_source/p3.py", line 25, in <module>
exponent_format=True,
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/plotly/figure_factory/_county_choropleth.py", line 622, in create_choropleth
"""
ValueError:
The create_choropleth figure factory requires the plotly-geo package.
Install using pip with:
$ pip install plotly-geo
Or, install using conda with
$ conda install -c plotly plotly-geo
The path of the site packages from your error suggests that you are executing your script with the non-anaconda version of python. I would suggest to uninstall it and only keep your anaconda distribution, as you can just create virtual environments should you need another python version
Related
After I upgraded pip from 8.1.1 to 19.0.1 by running
pip install --upgrade pip
I tried to test the version of pip by running
pip -V
But I got the following error
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
ImportError: cannot import name 'main'
I set the python3 and pip3 to be default by putting the following in ~/.bashrc
alias python=python3
alias pip=pip3
My system is ubuntu 16.04
This is a common issue as referenced here : https://github.com/pypa/pip/issues/5221
You are trying to use the pip, which is shipped with the Debian system. You better try to avoid using that pip at any cost.
Please use python3 -m pip install package instead of the system pip which you have in the debian system.
I also recommend using venv - virtual environments for keeping your system environment safe.
I am trying to install something using "python setup.py install" but it shows me this error :-
Traceback (most recent call last):
File "setup.py", line 3, in <module>
from setuptools import setup
ImportError: No module named setuptools
I have installed this missing module using "pip install setuptools". But still it shows me the same error .I have also tried to install this using "sudo apt-get install python-setuptools" but the problem still remains the same. Help me in this issue
If you have Python 2 >=2.7.9 or Python 3 >=3.4 installed from python.org, you will already have pip and setuptools, but will need to upgrade to the latest version:
On Linux or macOS:
pip install -U pip setuptools
On Windows:
python -m pip install -U pip setuptools
If you’re using a Python install on Linux that’s managed by the system package manager (e.g “yum”, “apt-get” etc…), and you want to use the system package manager to install or upgrade pip, then see link
I installed tmuxp using sudo pip install --user tmuxp. However I'm unable to load my profile work.yaml.
It throws error
Traceback (most recent call last):
File "/home/pranav/.local/bin/tmuxp", line 7, in <module>
from tmuxp import cli
ImportError: No module named tmuxp
I've followed https://github.com/tony/tmuxp instructions.
Uninstall: pip uninstall tmuxp
Assure the binary file is removed: rm ~/.local/bin/tmuxp
Reinstall: pip install --user tmuxp
Double check your python / pip configuration:
If the above doesn't work, there may be a larger issue with your pip installation, the problem may be a generic pip issue. 90% of the time this happens with PATHs from system's python mix up your user-level python.
Check which pip, which python and get an eye through tracebacks if your system's packages are mixing up with your local ones (e.g. /usr/local/python3.7/site-packages and ~/.somepath/python3.7/site-packages. If that is the case, consider clearing out all local pip packages and reinstalling pip through the get-pip.py installer.
I am running Anaconda on macOS Sierra utilising Python 2.7. I want to be able to run spykeviewer https://anaconda.org/pypi/spykeviewer
however I keep receiving this error:
*Traceback (most recent call last):
File "/Users/becky/anaconda/envs/spykeviewer-en/bin/spykeviewer", line 11, in <module>
sys.exit(main())
File "/Users/becky/anaconda/envs/spykeviewer-en/lib/python2.7/site-packages/spykeviewer/start.py", line 42, in main
from ui.main_window_neo import MainWindowNeo
File "/Users/becky/anaconda/envs/spykeviewer-en/lib/python2.7/site-packages/spykeviewer/ui/main_window_neo.py", line 16, in <module>
from spyderlib.widgets.variableexplorer.collectionseditor import \
ImportError: No module named spyderlib.widgets.variableexplorer.collectionseditor*
I have all of the dependent packages downloaded and I have reinstalled spyder as the error seems to be pointing to this module but I still get the same import error.
Here is how I installed the different packages:
conda install pyqt=4
conda install scipy
conda install gdata
conda install matplotlib
conda install pytables
conda install spyder
tables already installed in the environment
from terminal -> into guidata folder -> python setup.py install
from terminal -> into quiqwt -> python setup.py install
both are then in root —> open terminal in spykeviewer-en —> pip install guidata
condo install cython
pip install guiqwt
pip install neo
pip install spykeutils
pip install spykeviewerenter
I want to install PIL in python, but it seems I can't install the module correctly, is there anything that can solve the problem?
(My python version is 2.7)
Try installing Pillow, I was facing the same problem and then I figured out that PIL can be installed using the following.
pip install Pillow
Find your Python path:
which python
/Users/gogasca/anaconda/bin/python
You can install it from IDE itself or Project Settings:
Settings | Project | Project Interpreter | Select the right path, Click + and add pil Library
You can install from there. For me 1.1.7 worked in Pycharm 5.0.4 in OSX Python 2.7.10. Other alternatives is via CLI or Pillow
or from within pycharm terminal "pip install pillow"
if you get something like:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Temp\pip-install-owgbzt7s\Pil low\setup.
or
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\user\AppData\Local\Temp\pip-install-owgbzt7s\Pil low\setup.py", line 907, in
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
while installing Pillow , then there is some problem with your pip.
the version creating this issue are pip 19.xx.xx and Pillow 7.0.0
Solution(worked for me)
For PyCharm:
Go to settings > Project: (your project name) > Project Interpreter.
Double click on pip, check specify version which should be 20.0.2+ and click on "Install Package". This will reinstall pip for you.
Now either search for Pillow in same window and click on install or use python -m pip install Pillow in terminal of PyCharm.
For non PyCharm or Terminal Users:
uninstall pip apt-get remove --purge python-pip
install pip curl https://bootstrap.pypa.io/get-pip.py | sudo python