I am new to python and Linux. I installed swmm5 package in Linux by downloading the source SWMM5-5.1.0.102.zip:
python setup.py install
Before typing the previous syntax to install swmm5, I have unquoted #define CLE and deleted #include <direct.h> in the file swmm5.c, otherwise the installation won't succeed.
Then I tried to test the swmm5 package and get the following error:
from swmm5.swmm5tools import SWMM5Simulation
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pyangac/Py_libs/lib64/python/SWMM5-5.1.0.102-py2.7-linux-x86_64.egg/swmm5/swmm5tools.py", line 1, in <module>
from . import swmm5
File "/home/pyangac/Py_libs/lib64/python/SWMM5-5.1.0.102-py2.7-linux-x86_64.egg/swmm5/swmm5.py", line 28, in <module>
_swmm5 = swig_import_helper()
File "/home/pyangac/Py_libs/lib64/python/SWMM5-5.1.0.102-py2.7-linux-x86_64.egg/swmm5/swmm5.py", line 20, in swig_import_helper
import _swmm5
ImportError: /home/pyangac/Py_libs/lib64/python/SWMM5-5.1.0.102-py2.7-linux-x86_64.egg/_swmm5.so: undefined symbol: _mkdir
I have also installed the swmm5 package in Window, and the similar testing process gets no error.
Is there anyone understand what's going on and what should I do to use the swmm5 package in Linux? Thanks.
Related
I have installed tpm2_pytss and tried to run the tests present in their repo.
When I run any of those tests I always get the same error:
Traceback (most recent call last):
File "/home/xxxxxxxx/thesis/playground/quote.py", line 5, in <module>
from tpm2_pytss import *
File "/usr/local/lib/python3.9/dist-packages/tpm2_pytss/__init__.py", line 2, in <module>
from .ESAPI import ESAPI
File "/usr/local/lib/python3.9/dist-packages/tpm2_pytss/ESAPI.py", line 2, in <module>
from .types import *
File "/usr/local/lib/python3.9/dist-packages/tpm2_pytss/types.py", line 12, in <module>
from ._libtpm2_pytss import ffi, lib
ImportError: /usr/local/lib/python3.9/dist-packages/tpm2_pytss/_libtpm2_pytss.abi3.so: undefined symbol: Esys_MAC_Start_Async
(TPM is working, tpm2_tools is working)
I installed the APIs, it was a requirement of pytss installation. I ran the install with pip and solved all dependency problems (including the missing esapi API package).
I have a virtual env and I am trying to install a private (my company's) package into it. I download the tar.gz file in the project repo and then I do pip install pkg_name --find-links=".". But every time I get this error:
Traceback (most recent call last):
File "<string>", line 36, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/49/76fpmgk16_149s5r58lk33040000gq/T/pip-install-7ui62a2g/tmprint_1d674d12ea874b83b3fa7ad42797d36d/setup.py", line 2, in <module>
import distutils.command.bdist_conda
ModuleNotFoundError: No module named 'distutils.command.bdist_conda'
I am using python=3.7.4 on macOs.
Any help is really appreciated.
While python3 expects modules to be in /usr/local/lib/python3.4, pip3 installs them in /usr/local/lib/python3.4/dist-packages. This results in python3 not finding packages that pip3 says are installed.
I tried cutting and pasting the stuff in /usr/local/lib/python3.4/dist-packages to /usr/local/lib/python3.4, but I end up with weird errors, like this:
Traceback (most recent call last):
File "setup.py", line 13, in <module>
from Cython.Build import cythonize
File "/usr/local/lib/python3.4/Cython/Build/__init__.py", line 1, in <module>
from .Dependencies import cythonize
File "/usr/local/lib/python3.4/Cython/Build/Dependencies.py", line 51, in <module>
from ..Compiler.Main import Context, CompilationOptions, default_options
File "/usr/local/lib/python3.4/Cython/Compiler/Main.py", line 30, in <module>
from .Symtab import ModuleScope
File "/usr/local/lib/python3.4/Cython/Compiler/Symtab.py", line 18, in <module>
from . import PyrexTypes
File "/usr/local/lib/python3.4/Cython/Compiler/PyrexTypes.py", line 17, in <module>
from .Code import UtilityCode, LazyUtilityCode, TempitaUtilityCode
ImportError: /usr/local/lib/python3.4/Cython/Compiler/Code.cpython-34m.so: undefined symbol: PyFPE_jbuf
What do I do now? I'm on Linux Mint Cinnamon 64-bit.
[EDIT]
This problem was a complete mess and I still have no clue what happened before. I have given up trying to get Python to work, as I have found an application that does the same thing as the Python application I was trying to get working. It's such a pain.
I am trying to install phonopy on our super computer's login node following the instruction on under the Building using setup.py section here https://atztogo.github.io/phonopy/install.html.
Basically, just two commands:
tar xvfz phonopy-1.11.2.tar.gz
python setup.py install --user
It installs with no problem; however, when I use it, I get the following errors saying undefined symbol: __intel_sse2_strcpy. Here is the complete error message:
/home/syuan43/.local/bin/bandplot
Traceback (most recent call last):
File "/home/syuan43/.local/bin/bandplot", line 4, in <module>
__import__('pkg_resources').run_script('phonopy==1.11.8.5', 'bandplot')
File "/software/CentOS-6/tools/python-2.7.9/lib/python2.7/site-packages/pkg_resources/__init__.py", line 726, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/software/CentOS-6/tools/python-2.7.9/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1491, in run_script
exec(script_code, namespace, namespace)
File "/home/syuan43/.local/lib/python2.7/site-packages/phonopy-1.11.8.5-py2.7-linux-x86_64.egg/EGG-INFO/scripts/bandplot", line 52, in <module>
File "build/bdist.linux-x86_64/egg/phonopy/__init__.py", line 37, in <module>
File "build/bdist.linux-x86_64/egg/phonopy/api_phonopy.py", line 39, in <module>
File "build/bdist.linux-x86_64/egg/phonopy/structure/symmetry.py", line 37, in <module>
File "build/bdist.linux-x86_64/egg/phonopy/structure/spglib.py", line 35, in <module>
File "build/bdist.linux-x86_64/egg/phonopy/_spglib.py", line 7, in <module>
File "build/bdist.linux-x86_64/egg/phonopy/_spglib.py", line 6, in __bootstrap__
ImportError: /home/syuan43/.python-eggs/phonopy-1.11.8.5-py2.7-linux-x86_64.egg-tmp/phonopy/_spglib.so: undefined symbol: __intel_sse2_strcpy
Not sure if this may help, here is the module that I am using:
$ module list
Currently Loaded Modules:
1) ifort_icc/15.0 2) intel_mpi/5.0.1 3) python/2.7.9
Any idea how to resolve the problem above? Or any suggestions what might be the cause of it?
(Old issue but I'll add an answer for the next me.)
For me it was a compiler issue. Doing:
export CC=gcc
before doing the pip installs fixed this for me.
See also: https://github.com/jswhit/pyproj/issues/76
In my case uninstalling cf_units and installing again worked. I uninstalled cf_units from PIP and installed using anaconda
pip uninstall cf_units
conda install -c conda-forge cf_units
Here is my error:
Traceback (most recent call last):
File "./convert.py", line 6, in <module>
import openpyxl # from https://pythonhosted.org/openpyxl/ or PyPI (e.g. via pip)
ImportError: No module named openpyxl
i have installed the python package openpyxl but this error still appear
Im using linux python version 2.6.6
any help please
i got this new error when i ran the python2.7 script.py:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in <module>
from pip import main
File "/usr/local/lib/python2.7/site-packages/pip/__init__.py", line 13, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 15, in <module>
import zipfile
File "/usr/local/lib/python2.7/zipfile.py", line 6, in <module>
import io
File "/usr/local/lib/python2.7/io.py", line 51, in <module>
import _io
ImportError: /usr/local/lib/python2.7/lib-dynload/_io.so: undefined symbol: _PyErr_ReplaceException
openpyxl module has 2 dependent modules : 1. jdcal 2. et_xmlfile
I was able to install openpyxl module and this is what I did :
1.Downloaded the openpyxl,jdcal and et_xmlfile from https://pypi.python.org/pypi and saved jdcal-1.0.tar.gz, et_xmlfile-1.0.0.tar.gz,openpyxl-2.3.0-b2.tar.gz in a local folder in my system.
2.Then I ran the commands in the following order :
pip install jdcal-1.0.tar.gz
pip install et_xmlfile-1.0.0.tar.gz
pip install openpyxl-2.3.0-b2.tar.gz
openpyxl got successfully after this. Please check whether this helps.