Installing Python module pandas in Cloud9
Asked Answered
N

5

7

I'm having a hard time installing certain Python modules in Cloud9 ide.

I have tried using easy_install (their recommended method) and pip but with both I get a ton of warnings and end with errors (find the error messages below).

I have read that memory issues might be the problem, and that a possible solution is to increase the swap space, however apparently Cloud9 does not allow it, since sudo swapon /swap1 fails showing Operation not permitted

Anyone ever installed pandas in Cloud9? Any other method I should try?

UPDATE: I managed to install pandas using the Linux distribution’s package manager: sudo apt-get install python-pandas however I get the version 0.13 and I need the current version 0.16 to use pandasql.

This is what I get doing sudo easy_install pandas:

x86_64-linux-gnu-gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report, with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 4

This is what I get doing pip install pandas:

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 41: ordinal not in range(128)
Neelon answered 23/7, 2015 at 22:6 Comment(4)
how about use conda? I install miniconda from conda.pydata.org/miniconda.html, and then run conda install pandas to install pandas.Auxin
I have Anaconda installed, but I like Cloud9 and would like to work on that as well.Neelon
You can install conda or anaconda to cloud9Auxin
@Auxin Thanks for the help! You may turn your comment into an answer if you like.Neelon
B
8

I created 2 scripts to do the job:

script 01:

#! /bin/bash

#Downloading Miniconda 64Bits for Linux
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh

#Changing file permission for execution
chmod a+x Miniconda3-latest-Linux-x86_64.sh

#Installing Miniconda
./Miniconda3-latest-Linux-x86_64.sh

# Follow instructions to complete install

# Close and reopen terminal.
echo 'Please close the terminal reopen and run install02.sh script now'

Script 02:

#! /bin/bash

# Creating environment (sandbox instance called py3 [choose the name you want])
conda create -n py3 python=3 ipython

# Activating created environment
source activate py3

# Install package manager pip
conda install pip

# The installation installs the packages
#pip install numpy
#pip install pandas
#pip install matplotlib

# which ipython is to be used in the environment? pip freeze shows it
pip freeze

# Installing ipython notebook
conda install ipython-notebook

# Installing the packages
conda install numpy
conda install pandas
conda install matplotlib

I have installed more than only pandas, so as you can see in the script you can install any package using conda install package_name

Bentz answered 25/7, 2015 at 17:29 Comment(0)
G
5

Things may have changed since the question was asked, but I found I could use Python 3 pip using the following:

$ sudo pip-3.6 install pandas    

Note that the notation seems to be pip-3.6 rather than the typical pip3

Gunfight answered 25/1, 2018 at 10:58 Comment(0)
A
4

I have the same problem trying to install pandas version 0.20.3. I think the problem is that by default virtualenv will be installing Python 2 and this version of pandas may not work on it.

My solution was to create the environment with Python 3 inside cloud 9:

virtualenv -p python3 test

Then activate the environment:

source test/bin/activate

Update setuptools and pip:

pip install -U setuptools
pip install -U pip

And install pandas with pip:

pip install pandas

That did it.

Androw answered 27/8, 2017 at 14:44 Comment(0)
C
2

I'm not sure which version of Cloud9 I'm using. But on the terminal inside de function directory using this: venv/bin/pip install pandas -t . has always worked

Courtund answered 9/7, 2019 at 21:26 Comment(0)
A
1

I preferred downloading the main package with the following command.

wget https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh

Then installing it as described in Continuum by using the following.

bash Anaconda3-4.2.0-Linux-x86_64.sh

It gets everything installed including conda, pip, numpy, scipy and matplotlib etc.

Approximation answered 9/10, 2016 at 14:47 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.