Open NSmith-99 opened 10 months ago
+1, I also have this issue.
Me either, I also have this issue. I wonder it is because the version of python is much higher. But I cannot prove it. Is there anybody who can solve this issue?
Good news! I figure out how to solve this problem. Do not use anaconda environment!!! Just install python by commond "sudo apt install python3 python3-pip" and "sudo pip install numpy matplotlib -i URLs"
@yuedongning Although this works for you, it is not a good enough solution.
The error occurs when using newer versions of Python and hence newer versions of setuptools, which deprecate running setup.py
directly. The last version of setuptools to not show this error is 58.2.0 (source). I suspect that you are using Ubuntu 20.04 or a similarly old release, which means that when you run sudo apt install python3
you are installing an older version of Python---and with it a version of setuptools older than 58.2.0. Anaconda, however, comes with the latest version of Python and setuptools, which, I guess, is why you have jumped to the solution "don't use Anaconda". I'm afraid this isn't it.
A hacky (but universal) solution I have found is (with bash in the utilities/
directory):
mv build build.tmp
cp ../C/include/* ../C/src
pip install ./
This works with Anaconda and should work with older Python versions.
The build system needs reworking. I am on holiday until the 29th but will take a proper look when I return to work.
I think jthistle is very right about this problem. I tried to update the default python editor to the latest version, but there is always SSL build error. So, I failed. Then I tried jthistle codes
mv build build.tmp
cp ../C/include/* ../C/src
pip install ./
It successes and looks like that we also need to run make sdfutils
first.
@jthistle I thank you for your help very much!
This has now been fixed upstream with PR Warwick-Plasma/SDF_utilities#13 I will raise a PR for updating the SDF repository later today.
The install method for the SDF utilities is deprecated as of 2021, so on systems using more recent versions of python and its utility modules the
make sdfutils
method from the EPOCH Makefile's will not work. Thebuild
file in SDF/utilities makes use of a direct call ofsetup.py
, resulting in an error message informing the user this method is deprecated, as shown below.This can be circumvented manually by using the command
pip install ./
from the utilities folder, however since this creates its own file named build, the original build file must be renamed. If install is done manually, including the C/include/ folder in the include path is also necessary so the c files can compile correctly, usually performed automatically by the build file.