Code Monkey home page Code Monkey logo

Comments (27)

nsantini avatar nsantini commented on June 22, 2024 1

I fixed it by running:
mkdir -p /Users/nico/Library/Python/3.6/lib/python/site-packages
echo 'import site; site.addsitedir("/usr/local/lib/python3.6/site-packages")' >> /Users/<username>/Library/Python/3.6/lib/python/site-packages/homebrew.pth

Note: this is using python 3.6, change to your version, same with the username of your account

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024 1

I will try at home

from homebrew-rdkit.

Astrovicis avatar Astrovicis commented on June 22, 2024 1

This is still an issue for me and my colleague, even with the suggestion from @UnixJunkie above.

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

same thing for em on my Mac...

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

Why isn't the formula doing all this stuffs!!!
How am I supposed to know about those...
I'm really annoyed by this formula, it's not automatic.

from homebrew-rdkit.

nsantini avatar nsantini commented on June 22, 2024

I discovered it by looking into others trying to install python modules with brew, the commands came from the "caveats" in the brew install output from one of the dependencies... so no particularly obvious

from homebrew-rdkit.

mcs07 avatar mcs07 commented on June 22, 2024

Interesting. This really shouldn't be necessary. By any chance are you trying to import rdkit from a different python installation than the homebrew one?

which python3 should give something like /usr/local/bin/python3

And if you run import sys;print(sys.path) in the python interpreter, you should see /usr/local/lib/python3.6/site-packages already in there.... (without needing to add the homebrew.pth file)

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

Thanks, I will try this.

from homebrew-rdkit.

hsiaoyi0504 avatar hsiaoyi0504 commented on June 22, 2024

One thing I found is that when I tried to brew install rdkit --with-python3. I got this:
Warning: rdkit: this formula has no --with-python3 option so it will be ignored!

from homebrew-rdkit.

hsiaoyi0504 avatar hsiaoyi0504 commented on June 22, 2024

Forget that, it seems that my homebrew has some problem.

from homebrew-rdkit.

hsiaoyi0504 avatar hsiaoyi0504 commented on June 22, 2024

My python3 works for Homebrew-rdkit, but I need to install through brew install rdkit/rdkit/rdkit --with-python3

from homebrew-rdkit.

hsiaoyi0504 avatar hsiaoyi0504 commented on June 22, 2024

@UnixJunkie Is there any update of this ?

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

This can be closed.

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

I can repeatedly install rdkit using these steps:

pip3 install numpy
brew install --HEAD rdkit --with-python3 --with-inchi

This is no panacea, because it does not install a tagged release, but I can live with that for the moment.

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

@Astrovicis did the brew install work? Can you paste the full log of it.
What is the output of 'which python3'?

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

These days, you can even install a recently tagged version of rdkit:

brew tap rdkit/rdkit
which python3 || brew install python3
pip3 install numpy
brew install rdkit --with-inchi

from homebrew-rdkit.

Astrovicis avatar Astrovicis commented on June 22, 2024

brew install log:

==> Installing rdkit from rdkit/rdkit
==> Downloading https://github.com/rdkit/rdkit/archive/Release_2019_03_2.tar.gz
Already downloaded: /Users/maxhoward/Library/Caches/Homebrew/downloads/bfc63b18873a7e4cd38cb0629faa183240367686eef85d2251f3351efc03903e--rdkit-Release_2019_03_2.tar.gz
==> cmake -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -D
Last 15 lines from /Users/maxhoward/Library/Logs/Homebrew/rdkit/01.cmake:
    boost_pythonConfig.cmake
    boost_python-config.cmake

  Add the installation prefix of "boost_python" to CMAKE_PREFIX_PATH or set
  "boost_python_DIR" to a directory containing one of the above files.  If
  "boost_python" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
  /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindBoost.cmake:443 (find_package)
  CMakeLists.txt:255 (find_package)


-- Configuring incomplete, errors occurred!
See also "/tmp/rdkit-20190917-17742-10u5rc/rdkit-Release_2019_03_2/CMakeFiles/CMakeOutput.log".

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/rdkit/homebrew-rdkit/issues

These open issues may also help:
MacOS: ModuleNotFoundError: No module named 'rdkit' https://github.com/rdkit/homebrew-rdkit/issues/50
Installing RDKit on Mac OSX 10.10.2 with java and inchi https://github.com/rdkit/homebrew-rdkit/issues/25

which python3 output:
/usr/local/bin/python3

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

ok, the problem is that the current version of boost/boost-python in homebrew is not compatible with rdkit.
I don't know how to fix this easily.

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

This one would be nice to prevent this problem in the future:
#65

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

There was a related fix in the past:
rdkit/rdkit@738fc04
by @mcs07

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

I suspect the previous version in homebrew was working.
I looked the history of this file:
https://github.com/Homebrew/homebrew-core/commits/master/Formula/boost.rb
That would be boost 1.70.0 or the one just before: boost 1.69.0_2.
And I guess the boost-python3 formula's version must also match.

from homebrew-rdkit.

chenwenjie95 avatar chenwenjie95 commented on June 22, 2024

I fixed it by running:
mkdir -p /Users/nico/Library/Python/3.6/lib/python/site-packages
echo 'import site; site.addsitedir("/usr/local/lib/python3.6/site-packages")' >> /Users/<username>/Library/Python/3.6/lib/python/site-packages/homebrew.pth

Note: this is using python 3.6, change to your version, same with the username of your account

with this I still have the same error. MacOS: ModuleNotFoundError: No module named 'rdkit' #50

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

@chenwenjie95 try to use the rdkit install recipe from this PR:
#73
You need to do a git checkout, checkout the correct branch then add this as a tap to your homebrew.

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

@chenwenjie95 try this and tell us how it goes (with full log attached as a gist, if necessary):

brew update
which python3 || brew install python3
pip3 install numpy
brew unlink boost || echo boost_not_installed
brew unlink boost-python3 || echo boost-python3_not_installed
brew install rdkit --with-python3

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

Long time without new feedback so closing.
If the problem persists, ask us the reopen the issue.

from homebrew-rdkit.

wenchengxucool avatar wenchengxucool commented on June 22, 2024

I still have this problem

from homebrew-rdkit.

UnixJunkie avatar UnixJunkie commented on June 22, 2024

Install the new rdkit recipe, not from this tap:

brew uninstall --force rdkit
brew untap rdkit/rdkit
brew update
brew install rdkit

from homebrew-rdkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.