我很难在Cloud9 ide中安装特定的Python模块。
我尝试过使用easy_install (他们推荐的方法)和pip,但这两种方法都会收到大量警告,并以错误结尾(找到下面的错误消息)。
我读到过内存问题可能是问题所在,一个可能的解决方案是增加交换空间,尽管显然Cloud9不允许这样做,因为sudo swapon /swap1无法显示Operation not permitted。
有人在Cloud9安装过熊猫吗?还有其他方法我应该试试吗?
UPDATE:我成功地使用了Linux发行版的包管理器:sudo apt-get install python-pandas安装了熊猫,但是我得到了0.13版本,我需要当前的0.16版本才能使用pandasql。
这就是我要做的,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这就是我要做的,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)发布于 2015-07-25 17:29:27
我创建了两个脚本来完成这项工作:
脚本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'脚本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我安装的不仅仅是熊猫,所以正如您在脚本中看到的,您可以使用conda install package_name安装任何软件包。
发布于 2018-01-25 10:58:32
问题提出后,情况可能发生了变化,但我发现我可以使用Python3pip使用以下内容:
$ sudo pip-3.6 install pandas 注意,表示法似乎是pip-3.6而不是典型的pip3
发布于 2017-08-27 14:44:22
我在安装熊猫版本0.20.3时也遇到了同样的问题。我认为问题在于,在默认情况下,virtualenv将安装Python2,而这个版本的熊猫可能无法在上面工作。
我的解决方案是在云中使用Python 3创建环境:
virtualenv -p python3 test然后激活环境:
source test/bin/activate更新setuptools和pip:
pip install -U setuptools
pip install -U pip并在熊猫上安装pip:
pip install pandas那就成功了。
https://stackoverflow.com/questions/31598883
复制相似问题