Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid option: --with-python3 #113

Closed
aurimas13 opened this issue Mar 10, 2021 · 16 comments
Closed

Invalid option: --with-python3 #113

aurimas13 opened this issue Mar 10, 2021 · 16 comments

Comments

@aurimas13
Copy link

I am trying to install rdkit on my Macbook Pro through brew, but when I run: brew install rdkit --with-python I get this:
Error: Invalid option.
I am running the newest version of Big Sur (11.2.3). Can you help me to install rdkit with python 3?
As I understand brew removed --with-python, so a question is how to install RDkit with Homebrew?

I will look forward to all the responses.

Sincerely,
Aurimas

@greglandrum greglandrum transferred this issue from rdkit/rdkit Mar 11, 2021
@UnixJunkie
Copy link
Collaborator

try --with-python3 and tell me if it fixes your problem

@aurimas13
Copy link
Author

Same issue still. It says invalid option: --with-python3

@UnixJunkie
Copy link
Collaborator

Can you show the exact command you are using, full line?

@aurimas13
Copy link
Author

Of course.

I am writing this command in terminal:

brew install rdkit --with-python3

@UnixJunkie
Copy link
Collaborator

Did you do

brew tap rdkit/rdkit

before?
It is needed.

@aurimas13
Copy link
Author

Yeah. I've done the command you mentioned but still am getting invalid error when running:

brew install rdkit --with-python3

@UnixJunkie
Copy link
Collaborator

As a workaround, try the conda install method of rdkit.

For the future, can you create a gist showing the full log of your install attempt?

Out of despair, you should try what is mentioned in this paragraph of the README.md file
of this homebrew recipe:
"Forcing brew to install rdkit and all its dependencies from scratch"

@aurimas13
Copy link
Author

aurimas13 commented Mar 15, 2021

Out of despair I tried to reinstall rdkit from scratch:
brew list --formula > my_brew_packages.txt
brew uninstall --force $(cat my_brew_packages.txt)
brew install rdkit --with-python3
and then again did this:
brew tap rdkit/rdkit
brew install rdkit --with-python3
but in both cases I am still getting:
Error: invalid option: --with-python3

As for conda when I tried the installation with it I don't how to check whether it worked. What should I run to enter rdkit?

Also when I try to install RDKitPostgreSQL I run this:

conda install -c rdkit rdkit-postgresql it installs everything and then is followed by
/Users/Aurimas/opt/anaconda3/envs/my-rdkit-env/bin/initdb -D /folder/where/data/should/be/stored
which gives:
creating directory /folder/where/data/should/be/stored ... initdb: error: could not create directory "/folder": Read-only file system
How could this be solved?

@YoshitakaMo
Copy link

Now the homebrew-core (default) repository has the rdkit formula (Release 2020.09.4) and it binds to python3 by default.

brew untap rdkit/rdkit # if required
brew install rdkit

It also has rdkit-postgresql.

See also https://github.com/Homebrew/homebrew-core/blob/master/Formula/rdkit.rb

@UnixJunkie
Copy link
Collaborator

@aurimas13
Here is a test script; roundtrip_test.py in this repository:

#!/usr/local/bin/python3.9
# we have to use the python interpreter installed by brew...

# quick check that rdkit is installed and working
# upon success, the installed rdkit version is printed out
# upon failure, an assert will fail or some other error will
# be printed out

import rdkit
from rdkit import Chem

in_smi = 'c1ccncc1'
mol = Chem.MolFromSmiles(in_smi)
out_smi = Chem.MolToSmiles(mol)
assert(in_smi == out_smi)
print(rdkit.__version__)

@UnixJunkie
Copy link
Collaborator

The fact that there is a new formula with the same name in the master repository of brew might have broke the current formula
(it is silently ignored/overwritten).

@UnixJunkie
Copy link
Collaborator

I am closing this, I am sure the formula here supports --with-python3.

@wenchengxucool
Copy link

still have this problem

@nirajkamal
Copy link

I have this problem too, after latest Mac upgrade

@nirajkamal
Copy link

brew install vim --with-python3

this command shows this:
Error: invalid option: --with-python3

@nirajkamal
Copy link

@UnixJunkie , no it doesn't! it did before, but the latest version doesn't! Please do your research before closing issues.

Options have been removed from Homebrew core formulas and only exist in taps now. See this GitHub issue:
Homebrew/homebrew-core#31510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants