Python Forum
Trying to setup Python application, odd error
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to setup Python application, odd error
#1
Although python3 cannot find the Cython module:

[inline] python3 setup.py
Could not import cx_Freeze. Building executable not possible.
Traceback (most recent call last):
File "setup.py", line 13, in <module>
from Cython.Build import cythonize
ImportError: No module named 'Cython'[/inline]

pip3 says it has been installed:
[inline]
pip3 install Cython
Requirement already satisfied (use --upgrade to upgrade): Cython in /usr/local/lib/python3.4/dist-packages
Cleaning up...[/inline]

What is going on? How do I fix this?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Some more relevant information:
Pip version:

[inline] pip3 -V
pip 1.5.4 from /usr/lib/python3/dist-packages (python 3.4)[/inline]

Python version:

[inline] python3 -V
Python 3.4.6[/inline]

Tried to install from within Python session:

[inline] python3
Python 3.4.6 (default, May 11 2017, 18:25:35)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import Cython
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'Cython'
>>> sys.executable
'/usr/local/bin/python3'
>>> exit()

python3 -m pip install module
/usr/local/bin/python3: No module named pip

python3 -m pip Cython
/usr/local/bin/python3: No module named pip

sudo apt-get install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version.
The following packages were automatically installed and are no longer required:
libgsoap4 libvncserver0
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 189 not upgraded.[/inline]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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:

[inline] 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[/inline]

I am on Linux Mint Cinnamon 64-bit.
Reply


Messages In This Thread
Trying to setup Python application, odd error - by Yoshimaster96 - Jul-30-2017, 11:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How do I properly implement restarting a multithreaded python application? MrFentazis 1 746 Jul-17-2023, 09:10 PM
Last Post: JamesSmith
  Python running only in application Mawixy 2 1,228 Apr-19-2022, 11:38 AM
Last Post: Mawixy
  Setup Portable Python on Windows for script starts with double clicks? pstein 0 1,916 Feb-18-2022, 01:29 PM
Last Post: pstein
  How to send data from a python application to an external application aditya_rajiv 1 2,296 Jul-26-2021, 06:00 AM
Last Post: ndc85430
  python application and credentials safety concern aster 4 3,658 Mar-06-2021, 06:51 PM
Last Post: snippsat
  VSCode Setup and configuring to run with Python apollo 2 3,184 Jan-13-2021, 04:55 PM
Last Post: jefsummers
  Python Idlex setup robsuttonjr 3 3,210 Jan-09-2021, 09:54 PM
Last Post: Gribouillis
  ModuleNotFoundError when application is not installed via setup.py bytebutcher 3 2,276 Jan-08-2021, 10:28 AM
Last Post: Gribouillis
  python setup.py install error blackclover 2 8,151 Jan-07-2021, 04:36 AM
Last Post: blackclover
  Keep Application running after Python script ends PEGylated_User 0 2,071 Nov-12-2020, 03:27 PM
Last Post: PEGylated_User

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020