Skip to content
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

noise fails to install with pip #14

Closed
lordgordon opened this issue Aug 24, 2016 · 4 comments
Closed

noise fails to install with pip #14

lordgordon opened this issue Aug 24, 2016 · 4 comments

Comments

@lordgordon
Copy link

Hi,

this library fails to work if installed with pip.

Steps to reproduce:

  1. pip install noise;
  2. In a Python shell: import noise;

Error:

In [1]: import noise
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-d7ad5b8bb109> in <module>()
----> 1 import noise

/home/myuser/.virtualenvs/tesst/lib/python3.5/site-packages/noise/__init__.py in <module>()
     10 __version__ = "1.2.1"
     11
---> 12 from . import _perlin, _simplex
     13
     14 snoise2 = _simplex.noise2

ImportError: /home/myuser/.virtualenvs/test/lib/python3.5/site-packages/noise/_perlin.so: Undefined symbol "grad1"

In [2]: help(noise)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-2-3c38e3ae2f92> in <module>()
----> 1 help(noise)

NameError: name 'noise' is not defined

I tried to manually build the library with python setup.py install, yet it fails as the package distributed with pip doesn't have the C source code: it is shipped with the already compiled libraries!

System:

  • Python 3.5.2;
  • FreeBSD 10.3 RELEASE p4;
  • pip 8.1.2;
  • noise 1.2.2
@lordgordon
Copy link
Author

Here the content of the noise package just after pip install noise:

% cd ~/.virtualenvs/test/lib/python3.5/site-packages/noise
% ls -la
total 100
drwxr-xr-x    3 user  user   512B Aug 24 13:20 .
drwxr-x---  129 user  user   4.0K Aug 24 13:20 ..
-rw-r--r--    1 user  user   536B Aug 24 13:20 __init__.py
drwxr-xr-x    2 user  user   512B Aug 24 13:20 __pycache__
-rwxr-xr-x    1 user  user    19K Aug 24 13:20 _perlin.so
-rwxr-xr-x    1 user  user    22K Aug 24 13:20 _simplex.so
-rw-r--r--    1 user  user    11K Aug 24 13:20 perlin.py
-rw-r--r--    1 user  user   2.3K Aug 24 13:20 setup.py
-rw-r--r--    1 user  user   7.0K Aug 24 13:20 shader.py
-rw-r--r--    1 user  user   5.6K Aug 24 13:20 shader_noise.py
-rw-r--r--    1 user  user   4.5K Aug 24 13:20 test.py

Output of ldd:

% ldd -a _simplex.so
ldd: _simplex.so: Shared object "_simplex.so" not found, required by "ldd"
_simplex.so: exit status 1

@nickums
Copy link

nickums commented Aug 4, 2018

I have the same problem on Windows Python36 with the noise package.
In the directory are _perlin.c and simplex.c and init.py which fails to import them :
from noise import *
File "C:\Python\Python36\lib\site-packages\noise_init
.py", line 14, in
snoise2 = _simplex.noise2
NameError: name '_simplex' is not defined

@caseman caseman closed this as completed Nov 12, 2018
@RohitYadav900
Copy link

import noise

@boltholds
Copy link

Ubuntu 22 LTS Python2.7.18
Downloading the archive with the source code and launching it helped
sudo python setup.py install

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

5 participants