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

Installation error #187

Open
Neel-132 opened this issue Nov 30, 2023 · 14 comments
Open

Installation error #187

Neel-132 opened this issue Nov 30, 2023 · 14 comments

Comments

@Neel-132
Copy link

I tried to install cca-zoo several times but I keep getting errors like "python setup.py bdist_wheel did not run successfully".

@jameschapman19
Copy link
Owner

Hi sorry about that! Any details what your process has been? Just pip install from pypi or a local?

@Neel-132
Copy link
Author

I just used pip install cca-zoo. But, I think its having a problem with building a wheel

@jameschapman19
Copy link
Owner

I'm just making a couple of changes to not require torch install as I suspect that could cause some problems (regardless of whether it fixes this specific one!) any other error messages would be helpful if you have them

@Neel-132
Copy link
Author

Neel-132 commented Dec 1, 2023

Yes, it still is unable to build wheel for matplotlib. I have attached the corresponding screenshots.
Screenshot 2023-12-01 152055
Screenshot 2023-12-01 152116

@jameschapman19
Copy link
Owner

ok new version just released 2.5.0 doesn't require matplotlib (or pytorch another big dependency previously). Think this should fix your problem :)

@Neel-132
Copy link
Author

Neel-132 commented Dec 5, 2023

It did solve the issue. Thank you so much.

@jameschapman19
Copy link
Owner

No problem was lucky I happened to be trying to reduce dependencies - this version also imports A LOT quicker 😃

@MHRosenberg
Copy link

MHRosenberg commented May 1, 2024

Is this repo still active? Are installs working for others? I'm trying the getting started code in google colab and get errors suggesting that files are missing or renamed...

!pip install cca-zoo==2.5.0

`
import numpy as np
from cca_zoo.data.simulated import LinearSimulatedData
from cca_zoo.models import CCA

data = LinearSimulatedData(view_features=[10,10],latent_dims: int = 2)
(X,Y) = data.sample(n_samples=100)

model = CCA(latent_dimensions=2)
model.fit(views)

results = model.transform(views)`

File "", line 7
data = LinearSimulatedData(view_features=[10,10],latent_dims: int = 2)
^
SyntaxError: positional argument follows keyword argument

`
import numpy as np
from cca_zoo.data.simulated import LinearSimulatedData
from cca_zoo.models import CCA

data = LinearSimulatedData(view_features=[10,10],latent_dims= 2)
(X,Y) = data.sample(n_samples=100)

model = CCA(latent_dimensions=2)
model.fit(views)

results = model.transform(views)`


ModuleNotFoundError Traceback (most recent call last)
in <cell line: 3>()
1 # Import required libraries
2 import numpy as np
----> 3 from cca_zoo.data.simulated import LinearSimulatedData
4 from cca_zoo.models import CCA
5

ModuleNotFoundError: No module named 'cca_zoo.data'


NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.

`from cca_zoo.models import CCA

import numpy as np

train_view_1 = np.random.normal(size=(100, 10))
train_view_2 = np.random.normal(size=(100, 10))

train_view_1 -= train_view_1.mean(axis=0)
train_view_2 -= train_view_2.mean(axis=0)

latent_dimensions = 3
linear_cca = CCA(latent_dimensions=latent_dimensions)

linear_cca.fit((train_view_1, train_view_2))`


ModuleNotFoundError Traceback (most recent call last)
in <cell line: 1>()
----> 1 from cca_zoo.models import CCA
2
3 import numpy as np
4
5 # Create synthetic data for two views

ModuleNotFoundError: No module named 'cca_zoo.models'


NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.

@jameschapman19
Copy link
Owner

Keeping an eye on it - the problem here is more likely related to me documenting things incorrectly

@MHRosenberg
Copy link

Ok, thanks for the crazy fast reply!

Would it be possible to give me a working snippit in the meantime?

@jameschapman19
Copy link
Owner

Yeah do you know what you're trying to do? What was your original attempt based on? I know it's roughly under cca_zoo.datasets now (part of my ongoing (finished?) attempts to sync with scikit-learn)

@jameschapman19
Copy link
Owner

The first question so I can do a snippet the second so I know where the misleading documentation/example lives!

@MHRosenberg
Copy link

MHRosenberg commented May 1, 2024

I just want to run linear CCA, regularized CCA, and deep CCA to start. If I'm not mistaken, none of your example install and run code snippits work right now...

this
and this
also this

The exact code I ran in google colab is above. The installs complete without errors but the imports are all broken.

@jameschapman19
Copy link
Owner

Cool thanks!

I'll take a look at these as soon as I get the chance (maybe next couple of days) - in the meantime you can just use numpy arrays/your own data.

Basically I updated the namespace for the data stuff without updating the docs! Appreciate you pointing these out

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

3 participants