This is all on an iMac OSX 10.9.2
When doing a Homebrew install of python2.7 everything appears to be creating correctly. However upon finishing and attempting anything with pip or easy_install I keep getting the following error:
$ pip install virtualenv
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
I have tried uninstalling and reinstalling the Brewed python with the same results. I also ran the install with -v which produced the following:
==> Verifying python-2.7.6.mavericks.bottle.tar.gz checksum
==> Pouring python-2.7.6.mavericks.bottle.tar.gz
tar xf /Library/Caches/Homebrew/python-2.7.6.mavericks.bottle.tar.gz
==> Caveats
Python demo
/usr/local/share/python/Extras
Setuptools and Pip have been installed. To update them
pip install --upgrade setuptools
pip install --upgrade pip
You can install Python packages with (the outdated easy_install or)
`pip install <your_favorite_package>`
They will install into the site-package directory
/usr/local/lib/python2.7/site-packages
See: https://github.com/Homebrew/homebrew/wiki/Homebrew-and-Python
.app bundles were installed.
Run `brew linkapps` to symlink these to /Applications.
==> Finishing up
ln -s ../Cellar/python/2.7.6/bin/smtpd2.py smtpd2.py
ln -s ../Cellar/python/2.7.6/bin/smtpd2.7.py smtpd2.7.py
ln -s ../Cellar/python/2.7.6/bin/smtpd.py smtpd.py
ln -s ../Cellar/python/2.7.6/bin/pythonw2.7 pythonw2.7
ln -s ../Cellar/python/2.7.6/bin/pythonw2 pythonw2
ln -s ../Cellar/python/2.7.6/bin/pythonw pythonw
ln -s ../Cellar/python/2.7.6/bin/python2.7-config python2.7-config
ln -s ../Cellar/python/2.7.6/bin/python2.7 python2.7
ln -s ../Cellar/python/2.7.6/bin/python2-config python2-config
ln -s ../Cellar/python/2.7.6/bin/python2 python2
ln -s ../Cellar/python/2.7.6/bin/python-config python-config
ln -s ../Cellar/python/2.7.6/bin/python python
ln -s ../Cellar/python/2.7.6/bin/pydoc2.7 pydoc2.7
ln -s ../Cellar/python/2.7.6/bin/pydoc2 pydoc2
ln -s ../Cellar/python/2.7.6/bin/pydoc pydoc
ln -s ../Cellar/python/2.7.6/bin/pip2.7 pip2.7
ln -s ../Cellar/python/2.7.6/bin/pip2 pip2
ln -s ../Cellar/python/2.7.6/bin/pip pip
ln -s ../Cellar/python/2.7.6/bin/idle2.7 idle2.7
ln -s ../Cellar/python/2.7.6/bin/idle2 idle2
ln -s ../Cellar/python/2.7.6/bin/idle idle
ln -s ../Cellar/python/2.7.6/bin/easy_install-2.7 easy_install-2.7
ln -s ../Cellar/python/2.7.6/bin/easy_install easy_install
ln -s ../Cellar/python/2.7.6/bin/2to3-2.7 2to3-2.7
ln -s ../Cellar/python/2.7.6/bin/2to3-2 2to3-2
ln -s ../Cellar/python/2.7.6/bin/2to3 2to3
ln -s ../Cellar/python/2.7.6/share/python python
ln -s ../../../Cellar/python/2.7.6/share/man/man1/python2.7.1 python2.7.1
ln -s ../../../Cellar/python/2.7.6/share/man/man1/python2.1 python2.1
ln -s ../../../Cellar/python/2.7.6/share/man/man1/python.1 python.1
ln -s ../../../Cellar/python/2.7.6/Frameworks/Python.framework/Versions/Current Current
ln -s ../../../Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7 2.7
ln -s ../../Cellar/python/2.7.6/Frameworks/Python.framework/Resources Resources
ln -s ../../Cellar/python/2.7.6/Frameworks/Python.framework/Python Python
ln -s ../../Cellar/python/2.7.6/Frameworks/Python.framework/Headers Headers
ln -s ../../Cellar/python/2.7.6 python
ln -s ../Cellar/python/2.7.6 python
==> Summary
🍺 /usr/local/Cellar/python/2.7.6: 3790 files, 59M
I noticed that the Homebrew Python page indicated that "brew install python" should create a site packages folder at '/usr/local/lib/python2.7/site-packages'. However when I navigate to '/usr/local/lib' and use 'ls -a' there are no folders pertaining to python.
brew doctor reports no errors
Thank you in advance and please let me know what additional information may be needed.
In case anyone else runs into this I did manage to find a solution from the following page:
https://github.com/Homebrew/homebrew/issues/27515
It is apparently a bug in this most recent build. Doing a
brew install python --with-brewed-openssl
appears to do the trick.
Tom
Related
Rather than necro-post on a two-year old thread, I decided to create a new question.
I want add brew (homebrew) to a Docker container, but I get a brew: not found error.
The suggested solution in that previous article doesn't seem to work. This new Dockerfile...
FROM rust:1.63.0-buster
WORKDIR app
RUN apt-get update && \
apt-get install -y -q --allow-unauthenticated \
git \
sudo
RUN useradd -m -s /bin/zsh linuxbrew && \
usermod -aG sudo linuxbrew && \
mkdir -p /home/linuxbrew/.linuxbrew && \
chown -R linuxbrew: /home/linuxbrew/.linuxbrew
USER linuxbrew
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
USER root
RUN chown -R $CONTAINER_USER: /home/linuxbrew/.linuxbrew
RUN brew install hello
gives this error... What am I missing? Thanks.
=> ERROR [6/6] RUN brew install hello 0.2s
------
> [6/6] RUN brew install hello:
#9 0.181 /bin/sh: 1: brew: not found
------
executor failed running [/bin/sh -c brew install hello]: exit code: 127
This Dockerfile installs brew in /home/linuxbrew/.linuxbrew/bin/brew. Including that directory in the path (with the ENV command) does the trick.
...
ENV PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}"
RUN brew install hello
I have installed cmake3 through yum on my AWS Elastic Beanstalk instance:
packages:
yum:
cmake3: []
However when running a pip install that requires cmake, I'm getting an error:
FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake'
How can I alias cmake3 for cmake? I have tried the following and it is resulting in the same error message.
container_commands:
01_link_cmake:
command: "ln -s /usr/bin/cmake3 /usr/bin/cmake"
The reason I do not install cmake: [] is because I need version 3.
I have solved it. I realized that the pip package install happened before the ln -s container command. So even if my alias was happening, it was happening too late in the process.
Instead, what I needed to do was
container_commands:
01_link_cmake:
command: ln -s /usr/bin/cmake3 /usr/bin/cmake
02_upgrade_pip:
command: "python -m pip install --upgrade pip"
leader_only: true
03_install_package:
command: "python -m pip install <package that requires cmake>"
leader_only: true
I'm trying to use the pyarrow Filesystem interface with HDFS. I receive a libhdfs.so not found error when calling the fs.HadoopFileSystem constructor even though libhdfs.so is apparently at the indicated location.
from pyarrow import fs
hfs = fs.HadoopFileSystem(host="10.10.0.167", port=9870)
OSError: Unable to load libhdfs: /hadoop-3.3.1/lib/native/libhdfs.so: cannot open shared object file: No such file or directory
I've tried different python and pyarrow versions and setting ARROW_LIBHDFS_DIR. For testing, I'm using the following dockerfile on linuxmint.
FROM openjdk:11
RUN apt-get update &&\
apt-get install wget -y
RUN wget -nv https://dlcdn.apache.org/hadoop/common/hadoop-3.3.1/hadoop-3.3.1-aarch64.tar.gz &&\
tar -xf hadoop-3.3.1-aarch64.tar.gz
ENV PATH=/miniconda/bin:${PATH}
RUN wget -nv https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh &&\
bash miniconda.sh -b -p /miniconda &&\
conda init
RUN conda install -c conda-forge python=3.9.6
RUN conda install -c conda-forge pyarrow=4.0.1
ENV JAVA_HOME=/usr/local/openjdk-11
ENV HADOOP_HOME=/hadoop-3.3.1
RUN printf 'from pyarrow import fs\nhfs = fs.HadoopFileSystem(host="10.10.0.167", port=9870)\n' > test_arrow.py
# 'python test_arrow.py' fails with ...
# OSError: Unable to load libhdfs: /hadoop-3.3.1/lib/native/libhdfs.so: cannot open shared object file: No such file or directory
RUN python test_arrow.py || true
CMD ["/bin/bash"]
I have created a docker file for the pyarrow fs hadoopfilesystem client.
HDFS needs to be installed to use the libhdfs.so file.
RUN mkdir -p /data/hadoop
RUN apt-get -q update
RUN apt-get install software-properties-common -y
RUN add-apt-repository "deb http://deb.debian.org/debian/ sid main"
RUN apt-get -q update
RUN apt-get install openjdk-8-jdk -y
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*
RUN wget "https://dlcdn.apache.org/hadoop/common/hadoop-3.3.2/hadoop-3.3.2.tar.gz" -O hadoop-3.3.2.tar.gz
RUN tar xzf hadoop-3.3.2.tar.gz
ENV HADOOP_HOME=/app/hadoop-3.3.2
ENV HADOOP_INSTALL=$HADOOP_HOME
ENV HADOOP_MAPRED_HOME=$HADOOP_HOME
ENV HADOOP_COMMON_HOME=$HADOOP_HOME
ENV HADOOP_HDFS_HOME=$HADOOP_HOME
ENV YARN_HOME=$HADOOP_HOME
ENV HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
ENV PATH=$PATH:$HADOOP_HOME/sbin:$HADOOP_HOME/bin
ENV HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib/nativ"
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
ENV CLASSPATH="$HADOOP_HOME/bin/hadoop classpath --glob"
ENV ARROW_LIBHDFS_DIR=$HADOOP_HOME/lib/native
ADD pyarrow-app.py /app/
CMD [ "python3" "-u" "/app/pyarrow-app.py.py"]
I'm trying to use shadowsocksR in my ubuntu 16 .
sudo apt-get install git
git clone -b manyuser https://github.com/shadowsocksr-backup/shadowsocksr.git
cd shadowsocksr/shadowsocks
python local.py -s server_ip -p server_port -k password -m chacha20-ietf -o tls1.2_ticket_auth
then he said " libsodium not found" so I install libsodium
download the LATEST.tar.gz from https://download.libsodium.org/libsodium/releases/
tar -zxf LATEST.tar.gz
cd libsodium-stable
./configure
make && make check
sudo make install
```
but this time
python local.py -s server_ip -p server_port -k password -m chacha20-ietf -o tls1.2_ticket_auth
He said OSError: libsodium.so.23: cannot open shared object file: No such file or directory
thankyou for your help
You need to install libsodium-dev
Try running "apt-get install libsodium-dev"
If you've compiled libsodium, make sure libsodium is in the linker cache:
ldconfig -p | grep libsodium
If there is no output, chances are that the linker cache is not updated in time.
You can update the cache by:
sudo ldconfig
I installed .donet core and code under CentOS 7 but I get this error:
curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?linkID=816869
sudo mkdir -p /opt/dotnet && sudo tar xvf dotnet.tar.gz -C /opt/dotnet
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
curl -sSL -o code.el7.x86_64.rpm https://go.microsoft.com/fwlink/?linkID=760867
sudo yum localinstall code.el7.x86_64.rpm
dotnet --version
dotnet: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by dotnet)