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

Unable to install with Python 3.8.5 #31

Open
Zander1983 opened this issue Dec 31, 2021 · 3 comments
Open

Unable to install with Python 3.8.5 #31

Zander1983 opened this issue Dec 31, 2021 · 3 comments

Comments

@Zander1983
Copy link

I have installed conda and created a new virtual environment:

conda create --name myEnv python=3.8.5

Activate the environment:

conda activate myEnv

Installed numpy:

pip install numpy==1.19

This worked fine. But then when I try:

pip install cytopy

But I end up with this error:

flowutils/logicle_c_ext/_logicle.c:120:5: error: implicit declaration of function 'hyperlog_inverse' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        hyperlog_inverse(t, w, m, a, xc, n);
        ^
    flowutils/logicle_c_ext/_logicle.c:120:5: note: did you mean 'wrap_hyperlog_inverse'?
    flowutils/logicle_c_ext/_logicle.c:95:18: note: 'wrap_hyperlog_inverse' declared here
    static PyObject *wrap_hyperlog_inverse(PyObject *self, PyObject *args) {
                     ^
    1 warning and 1 error generated.
    error: command 'gcc' failed with exit status 1
@burtonrj
Copy link
Owner

burtonrj commented Jan 4, 2022

Hi,

I would first check what version of FlowUtils you have installed. It should be version 0.9.3. Try reinstalling numpy and then FlowUtils and hopefully this should resolve the issues.

Currently the most reliable way of using CytoPy v2.0 is with the docker image. Version 3 of CytoPy is under active development and will address installation issues. Apologies for any trouble this has caused.

Ross

@sarajohns19
Copy link

Hi!
I'm running into the same problem as those above (MacOS Big Sur 11.3.1, Intel chip), so I took a stab at using the Docker image.

But after opening the jupyter notebook via the Docker image, the "shapely" package could not be found/imported.

from cytopy.data.project import Project

~/Box Sync/Flow Cytometry Data/Python/CytoPy/cytopy/data/geometry.py in
37 from scipy import linalg, stats
38 from scipy.spatial.qhull import ConvexHull, QhullError
---> 39 from shapely.geometry import Polygon, Point
40 import mongoengine
ModuleNotFoundError: No module named 'shapely'

These are the steps I took to run the Docker image:

  1. Cloned the CytoPy repo on a Box Sync folder, which is synced on my local machine.
  2. In the .yml file, I altered the three directories from DockerData/db, to be in the same Box Sync folder.
  3. Navigated to the repo in Terminal and ran `docker-compose up'. The images successfully running.
  4. At the end of the image install, the terminal gave a URL for opening the jupyter notebook:

cytopy-CytoPy-1 | [I 2022-01-25 21:45:56.611 ServerApp] jupyterlab | extension was successfully linked.
cytopy-CytoPy-1 | [I 2022-01-25 21:45:56.624 ServerApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/jupyter_cookie_secret
cytopy-CytoPy-1 | [I 2022-01-25 21:45:56.990 ServerApp] nbclassic | extension was successfully linked.
cytopy-CytoPy-1 | [I 2022-01-25 21:45:57.036 ServerApp] nbclassic | extension was successfully loaded.
cytopy-CytoPy-1 | [I 2022-01-25 21:45:57.037 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.8/dist-packages/jupyterlab
cytopy-CytoPy-1 | [I 2022-01-25 21:45:57.037 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab
cytopy-CytoPy-1 | [I 2022-01-25 21:45:57.041 ServerApp] jupyterlab | extension was successfully loaded.
cytopy-CytoPy-1 | [I 2022-01-25 21:45:57.042 ServerApp] Serving notebooks from local directory: /home/notebooks
cytopy-CytoPy-1 | [I 2022-01-25 21:45:57.042 ServerApp] Jupyter Server 1.8.0 is running at:
cytopy-CytoPy-1 | [I 2022-01-25 21:45:57.042 ServerApp] http://7e876fdb2a57:8888/lab?token=59471e39121e01e73d3eb8dc497f60903d33aaa5dfb89c2b
cytopy-CytoPy-1 | [I 2022-01-25 21:45:57.042 ServerApp] http://127.0.0.1:8888/lab?token=59471e39121e01e73d3eb8dc497f60903d33aaa5dfb89c2b
cytopy-CytoPy-1 | [I 2022-01-25 21:45:57.042 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
cytopy-CytoPy-1 | [C 2022-01-25 21:45:57.046 ServerApp]
cytopy-CytoPy-1 |
cytopy-CytoPy-1 | To access the server, open this file in a browser:
cytopy-CytoPy-1 | file:///root/.local/share/jupyter/runtime/jpserver-7-open.html

However, the given URL/links led to a Jupyter site that required a different token or password than the ones created in cytopy-CytoPy-1 in order to access the jupyter server (attached screenshot). I wasn't sure what to do at this point.

  1. I opened a new terminal and ran jupyter notebook list which listed a notebook running on local host 8888. If I copy that URL into the browser, it takes me to the notebook, which gets saved in the \notebooks path defined in the .yml file.

  2. Using that notebook, when I try to import Project from CytoPy, it throws the "ModuleNotFoundError," although I can locate the "shapely" package in the CytoPy-1 image filesystem. Thoroughly stumped.

I'm new to Docker, so I would greatly appreciate any tips on how to properly run the jupyter notebook! Thanks!!

Screen Shot 2022-01-25 at 3 55 11 PM

`

@JANHMS
Copy link

JANHMS commented Mar 1, 2022

I have installed conda and created a new virtual environment:

conda create --name myEnv python=3.8.5

Activate the environment:

conda activate myEnv

Installed numpy:

pip install numpy==1.19

This worked fine. But then when I try:

pip install cytopy

But I end up with this error:

flowutils/logicle_c_ext/_logicle.c:120:5: error: implicit declaration of function 'hyperlog_inverse' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        hyperlog_inverse(t, w, m, a, xc, n);
        ^
    flowutils/logicle_c_ext/_logicle.c:120:5: note: did you mean 'wrap_hyperlog_inverse'?
    flowutils/logicle_c_ext/_logicle.c:95:18: note: 'wrap_hyperlog_inverse' declared here
    static PyObject *wrap_hyperlog_inverse(PyObject *self, PyObject *args) {
                     ^
    1 warning and 1 error generated.
    error: command 'gcc' failed with exit status 1

Same error here

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

4 participants