-
Notifications
You must be signed in to change notification settings - Fork 80
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
Problem installing fa2 on Python3.9 #34
Comments
I have the same issue with Python 3.9 on Ubuntu 18.04...any luck? |
I'm afraid not. |
bump on this, anything anyone has found to correct? I'm afraid the HoloViews/Datashader implementations aren't very fast, so I'm really hoping to use this one |
I also had issues, for the same reason. I have...
My hack prepended this section into fa2util.c and totally guessed how to avoid GET_SIZE completely...
beefing up code around Lines 427 to 453 in da3ece0
|
Oh. My cython 0.29.26 got it wrong. |
Have the same issue with python 3.9.1. Fixed with rolling back to |
Just in case someone does not stumble over the workaround documented in #35: the current main branch compiles under Python 3.10, so:
compiles and installs fine also under current Python environments. It is really just the outdated last release, not a lack of maintenance of the codebase itself. |
Bumping this as still being an issue on Python 3.9.15 |
@ojdo what is ther version of Cython you are using and what is the meaining of below line :
With your steps also, I am not able to install the library. I am getting the below errors :
Let us know about what needs to be done. |
Here is the issue to be precise :
|
I'm having the same issue of unknonw file type .pxd here with Python 3.10.9 and Cython 3.0.0. |
Getting the same error too. Not only in Centos 8 but also in Windows 11. Cython 3.0.0 and different versions of python have been tried, including python 3.7.10 and python 3.10.8. All failed. Error messages are shown by the following: × python setup.py bdist_wheel did not run successfully.
note: This error originates from a subprocess, and is likely not a problem with pip. × Running setup.py install for fa2 did not run successfully.
note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while trying to install package. note: This is an issue with the package mentioned above, not pip. |
I'm getting a similar set of errors on Python 3.10.12
and a bunch of deprecation warnings |
Same error with Python 3.10 and Cython 3.0.
|
I managed to solve this issue with modifying the setup.py file: |
Switching off fa2/fautil.pxd seems to be a partial solution. This is what I get when run scanpy: Complete solution still needed |
@eugbrenner You still need to have Cython installed indeed. The modification I made is to make it work with newer versions of Cython |
@AminAlam. You are right, I did no have cython installed in this venv. Just fixed it. But still have this message |
@eugbrenner This is not happening for me. In general, having Cython should be enough for compiling fa2util.py to fa2util.c. Can you please send the output of the this command |
Hi, @AminAlam , What I did from the very begining is:
These venvs are:
Although, I managed to install fa2 on all these venvs without errors and warnings, running 'import fa2' results in the same warning in all these venvs. This warning says ' Warning: uncompiled fa2util module. Compile with cython for a 10-100x speed boost.' Is there anything else I can do to speed up fa2 calculations? |
@eugbrenner Use the setup.py of this commit, and install it using |
@AminAlam Thanks for your reply. I've done everything that you advised and managed to install fa2_modified into python3.9.17 + cython-3.0.10 and python3.8.13 + cython-3.0.0 virtual environments. Nevertheless, I still get 'Warning: uncompiled fa2util module. Compile with cython for a 10-100x speed boost.' when importing fa2_module at either venv. Furthermore, since I need fa2 to use with scanpy, I get "WARNING: Package 'fa2' is not installed, falling back to layout 'fr'. To use the faster and better ForceAtlas2 layout, install package 'fa2' ( Here is my build directory 'ls -R' output: ./bdist.linux-x86_64: ./lib.linux-x86_64-cpython-38: ./lib.linux-x86_64-cpython-38/fa2_modified: ./lib.linux-x86_64-cpython-39: ./lib.linux-x86_64-cpython-39/fa2_modified: ./temp.linux-x86_64-cpython-38: ./temp.linux-x86_64-cpython-38/fa2_modified: ./temp.linux-x86_64-cpython-39: ./temp.linux-x86_64-cpython-39/fa2_modified: |
@eugbrenner Please use the codes in |
@eugbrenner I've changed fa2_modified PyPi setup to ensure it will compile "fa2util.pxd" to "fa2util.c". Please install it using |
@AminAlam Version 0.3.9 can be installed and run on python3.9.17 + cython-3.0.10 fine! Thank you. Do you have any suggestions to make scanpy use it instead fa2? |
Nice! Happy to hear it's working for you. Regarding your problem: I suggest to change the source code of scapy to make it use fa2_modified instead of fa2. However, I've checked scanpy source code and it seems like they are not using fa2 module. |
you are a good person |
To anyone who are working on python 3.9+ (I'm on ptyhon3.11 myself) and want a solution that integrates fa2 with scanpy here's what I did: [1] Install fa2_modified repo: [2] Locate your python3.9+ installed package directory: [3] Rename the fa2_modified and metadata directory names: Or do
Testing this this with scanpy:
Works well without the warning of 'fa2' not installed. Cheers! |
It seems that fa2 is not compatible with Python3.9
`ERROR: Command errored out with exit status 1:
command: /usr/local/opt/[email protected]/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tb/yb5np6tx5tg852_7ktrz3qy40000gn/T/pip-install-345a9yt5/fa2_127e2c475c0344ff93462856df90b805/setup.py'"'"'; file='"'"'/private/var/folders/tb/yb5np6tx5tg852_7ktrz3qy40000gn/T/pip-install-345a9yt5/fa2_127e2c475c0344ff93462856df90b805/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/tb/yb5np6tx5tg852_7ktrz3qy40000gn/T/pip-record-tehayj72/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/fa2
cwd: /private/var/folders/tb/yb5np6tx5tg852_7ktrz3qy40000gn/T/pip-install-345a9yt5/fa2_127e2c475c0344ff93462856df90b805/
Complete output (214 lines):
Installing fa2 package (fastest forceatlas2 python implementation)
ERROR: Command errored out with exit status 1: /usr/local/opt/[email protected]/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tb/yb5np6tx5tg852_7ktrz3qy40000gn/T/pip-install-345a9yt5/fa2_127e2c475c0344ff93462856df90b805/setup.py'"'"'; file='"'"'/private/var/folders/tb/yb5np6tx5tg852_7ktrz3qy40000gn/T/pip-install-345a9yt5/fa2_127e2c475c0344ff93462856df90b805/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/tb/yb5np6tx5tg852_7ktrz3qy40000gn/T/pip-record-tehayj72/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/fa2 Check the logs for full command output.
`
The text was updated successfully, but these errors were encountered: