From charlesreid1

(Created page with "First install python, setuptools, easy_install, and pip: <pre> sudo apt-get install -y python python-setuptools python-pip </pre> Now change permissions so we can run pip witho...")
 
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Installing=
First install python, setuptools, easy_install, and pip:
First install python, setuptools, easy_install, and pip:


Line 8: Line 10:


<pre>
<pre>
sudo usermod -g staff charles
sudo usermod -a -G staff charles
sudo chmod g+w /usr
sudo chmod g+w /usr
sudo chmod -R g+w /usr/local
sudo chmod -R g+w /usr/local
</pre>
</pre>
Now install useful stuff:
<pre>
pip install flask numpy pandas
pip install cython
</pre>
<pre>
sudo apt-get install h5utils
pip install h5py
</pre>
<pre>
pip install xlrd xlwt pelican
</pre>
<pre>
sudo apt-get install liblapack-dev
sudo apt-get install gfortran
pip install scipy
</pre>
More stuff
<pre>
pip install ipython
</pre>
Matplotlib prerequisites were tricky, see [http://stackoverflow.com/questions/20533426/ubuntu-running-pip-install-gives-error-the-following-required-packages-can-no]:
<pre>
sudo apt-get install libpng-dev libfreetype6-dev libxft-dev
pip install matplotlib
</pre>
stats:
<pre>
pip install seaborn
</pre>
==Errors==
O NOES
<pre>
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 72: ordinal not in range(128)
</pre>
[http://stackoverflow.com/questions/26473681/pip-install-numpy-throws-an-error-ascii-codec-cant-decode-byte-0xe2 stack overflow to the rescue]
I ran:
<pre>
sudo apt-get install python-dev
</pre>
and then
<pre>
pip install numpy
</pre>
ran without errors!
[[Category:Linux]]
[[Category:Ubuntu]]
[[Category:Python]]
[[Category:Programming]]
[[Category:Server]]

Latest revision as of 21:49, 25 March 2017

Installing

First install python, setuptools, easy_install, and pip:

sudo apt-get install -y python python-setuptools python-pip

Now change permissions so we can run pip without sudo:

sudo usermod -a -G staff charles
sudo chmod g+w /usr
sudo chmod -R g+w /usr/local

Now install useful stuff:

pip install flask numpy pandas
pip install cython
sudo apt-get install h5utils
pip install h5py
pip install xlrd xlwt pelican
sudo apt-get install liblapack-dev
sudo apt-get install gfortran
pip install scipy

More stuff

pip install ipython

Matplotlib prerequisites were tricky, see [1]:

sudo apt-get install libpng-dev libfreetype6-dev libxft-dev
pip install matplotlib

stats:

pip install seaborn

Errors

O NOES

Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 72: ordinal not in range(128)

stack overflow to the rescue

I ran:

sudo apt-get install python-dev

and then

pip install numpy

ran without errors!