Skip to content

Installation Issues #10

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

Closed
eihwood opened this issue May 31, 2022 · 11 comments
Closed

Installation Issues #10

eihwood opened this issue May 31, 2022 · 11 comments

Comments

@eihwood
Copy link

eihwood commented May 31, 2022

Hi Walter!

Thanks to you and KC so much for all your work on this incredibly useful package. A few things:

  1. I am working on my mac mini (2018) with intel processor with OS12.3.1 Monterey (I also have a macbook pro arm64)
  2. I am conducting a fresh install on my work computer to get the bug fixes and a few questions came up - mostly having to do with installation instructions and documentation.
  3. My process is briefly - a) latest installation of miniconda in /Users//opt/miniconda and b) creation of lightweight env - conda create --no-default-packages -n morphometrix pip, c) but when I go to install morphometrix using conda-forge -c wingtorres -n morphometrix python morphometrix=1.0.2 and then run "python -m morphometrix" I get complaints about
  4. No module named 'PyQt5.QtWebEngineWidgets'... which is strange because my understanding was that you migrated all to PyQt6... starting MorphoMetriX also fails after I attempt to pip install PyQt5 and PyQtWebEngine...
  5. Perhaps the only source code that works is the devtools version installed with 'git clone https://github.com/wingtorres/morphometrix.git' into my /Users//morphs directory? This works, though in addition to pip install PyQt6 PyQt6-WebEngine numpy I also have to pip install scipy which isn't in your documentation. Curious what is going on there? It might help users to update the installation instructions on the github page if you have time :) TY!!!
  6. Ok, so then using the git clone installed version I can open up MorphoMetriX and load an image. However, that same Bezier functionality issue we were having last December is either back or hasn't been solved. I will respond in that Issues thread so it is not mixed in with the above installation issues.
@Quade-CBEL
Copy link

Good morning everyone,

I'm also receiving the same error of installation that heyelle is receiving, on both windows and mac operating systems.

@Quade-CBEL
Copy link

Error(s) I receive copied below:

(myenv) C:\Users\Quade>python -m morphometrix
Traceback (most recent call last):
File "C:\Users\Quade\miniconda3\envs\myenv\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Quade\miniconda3\envs\myenv\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\Quade\miniconda3\envs\myenv\lib\site-packages\morphometrix-1.0.2-py3.8.egg\morphometrix_main
.py", line 9, in
ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'

After pip install PyQtWebEngine:
(myenv) C:\Users\Quade>python -m morphometrix
Traceback (most recent call last):
File "C:\Users\Quade\miniconda3\envs\myenv\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Quade\miniconda3\envs\myenv\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\Quade\miniconda3\envs\myenv\lib\site-packages\morphometrix-1.0.2-py3.8.egg\morphometrix_main
.py", line 9, in
ImportError: DLL load failed while importing QtWebEngineWidgets: The specified module could not be found.

@AshleighNovak
Copy link

I am also having the same issue. Fresh install on a Windows 10, followed all directions, but getting the same exact error message as both folks above. No need to share here again since it's exactly the same.

We are super interested in being able to use this program this summer, so thanks in advance!

@wingtorres
Copy link
Owner

wingtorres commented Jul 5, 2022

hi y'all, great to hear there is interest in using the package and sorry for the delayed response. I have had time off for the last few months, and am just now catching up on things. @heyelle thanks for the detailed look into the install details. Your 5) approach, i.e. git cloning directly, will fetch the most up-to-date version of the package including the PyQt6 update and some bug fixes. Installing via Anaconda would be using older code (PyQt5) that I would not expect to be supported by Apple M1, but weird that it does not work on your Intel mac, as that's what I used to build and test that version awhile ago...

I was really hoping that by this point PyQt6 would be available as an anaconda package so I could just update the morphometrix conda package and make it easily downloadable via conda install. Unfortunately, that hasn't happened yet, so I will just update the install instructions to recommend downloading via git clone, pip install, etc.

I will try a fresh install now using git clone and update the README instructions assuming things are working as expected.

also @heyelle thanks for letting me know about the Bezier curve issue, hopefully we can get that sorted in the other thread.

@wingtorres
Copy link
Owner

hi everyone, i updated the install instructions. Can everyone try to install it directly from github following the README.md and report back when you get a chance? I was able to get it to work on a fresh environment on an Apple M1 MacOS Monterey 12.4 but haven't tried Windows. @AshleighNovak @Quade-CBEL let me know if there any issues.

@AshleighNovak
Copy link

AshleighNovak commented Jul 11, 2022

Hello! Thanks so much for updating!! I was able to successfully get the program to work on my Windows 10 computer. I didn't start fresh from what I had tried previously. I'm adding my steps here for the other folks, like me, that also may not be great with figuring out programming languages/working with the command lines of different programs.

  1. Download Zipped folder of morphometrix from the GitHub page (unzip on your local machine)
  2. Open up Git Bash on your computer to run Step 1 (git clone...)
  3. Install Python (I installed Python 3.10), since I didn't have it previously
  4. Open up a command prompt on your computer and run the pip install line of code (won't work in a python prompt)
  5. Navigate to where morphometrix is on your computer with cd (can just stay in the same command prompt after installing pip)
  6. Run python -m morphometrix and voila!

I did get the attached error message, but I tested the program and all seems fine and it exports measurements so I am very happy! Thanks so much for the help on this!

PXL_20220711_134308818 MP

@wingtorres
Copy link
Owner

hey @AshleighNovak thanks for giving it a go and providing clear instructions to others! Once others have confirmed it works I'll go ahead and close the ticket.

@Quade-CBEL
Copy link

@AshleighNovak Would you mind explaining Step 5 in your instructions. I am very new to the world of programming so I'm not sure how to navigate to the morphometrix folder. I tried Set-Location to the unzipped folder, but receive "no module named morphometrix" when I do so.

@wingtorres, @AshleighNovak I have been using the Anaconda Powershell Prompt however, so this may be an issue later on that I will update the thread with. I was able to run conda install git successfully, git clone successfully, as well as the pip install line of code for PyQt6, PyQt6-WebEngine numpy scipy. If I try to immediately run the python -m morphometrix the error I receive is " No module named morphometrix.main; 'morphometrix' is a package and cannot be directly executed". When I tried/failed to set the location, the error is "no module named morphometrix"

My apologies for the rambling. The world of python/gitclone is nearly brand new to me.

@AshleighNovak
Copy link

@Quade-CBEL, all you need to do for step 5 is open up a regular command prompt on your computer (can type command prompt into your search bar - I'm not using conda or the Anaconda powershell prompt, you shouldn't need to do anything with Python except install the latest version on your computer) and then navigate to where the morphometrix folder is on your computer. When you open up the command prompt you should already be in your C:\Users\YourName so you can type dir to see where you need to go. I just needed to use cd morphometrix which changes my directory to C:\Users\YourName\morphometrix. THEN you can do step 6 and type python -m morphometrix. I think your problem is your trying to run the last line when you aren't in the directory, so you just need to get yourself there and you should be in good shape!

@Quade-CBEL
Copy link

@AshleighNovak Success! Thank you.

@wingtorres
Copy link
Owner

wingtorres commented Jul 12, 2022

Great to see y'all were able to sort it out! Another thing one can do is add the following line to your ~/.bash_profile script to make it so you don't have to navigate to the morphometrix directory every time. This line automatically adds morphometrix to your path whenever you open a new terminal window. I'm not sure what the analog is on Windows however.

export PATH=$PATH:(insert full path to morphometrix 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