Maybe it’s time to retire Project IDX?

Just tried to make a new python project…
Didn’t worked.

Whenever I’m using codesandboxio everything works perfectly. And it’s the same engine…

Hi @Phillip_Souza - what is the error you are seeing? Are you creating a Python Django project?

Python Flask.
Whenever I try to install pip, got error.
Tried to force install pip within the dev.nix, error.
After many times trying to rebuild the project and installing I finally got it to work.
Tried to install the packages I need using pip, error again.
And all I’m trying to do is creating an OFX converter using python (which I did using another platform).
Sometimes, just trying to add the pkgs in the dev.nix file the environment just breaks (I’m not even editing the file structure, just adding pkgs since the pip is not working properly).

When I approached codesandboxio to install the packages using pip, well, I didn’t need to install the actual pip and all the packages I tried to install, installed sucessfully.

Today I tried to download the files of my next/tailwind project… to my NO surprise, the option is not working (3 weeks now). I had to manually copy/paste the code of all my files to another IDE.

Don’t get me wrong, I had none of these problems until 1 month ago, I even recommended IDX to many of my friends who stopped using Replit. But now…

Hi,

Can you tell me what packages you were trying to install?

When you try to “Zip & Download” a folder, do you see any errors in the console?

When I try to Zip & Donwload it does nothing, this is specific to the Next project, I can zip&download with the other projects as normal. I tried to rebuild the project but got the same thing.

Within the python project I’m trying to install numpy. The package is installed:

(.venv) ofx-68310:~/ofx$ pip uninstall numpy -y
pip install --no-cache-dir numpy
Found existing installation: numpy 2.2.3
Uninstalling numpy-2.2.3:
  Successfully uninstalled numpy-2.2.3
Collecting numpy
  Downloading numpy-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.0/62.0 kB 3.9 MB/s eta 0:00:00
Downloading numpy-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.4/16.4 MB 17.7 MB/s eta 0:00:00
Installing collected packages: numpy
Successfully installed numpy-2.2.3

but the IDX cannot recognize it.

ImportError: Unable to import required dependencies:
numpy: Error importing numpy: you should not try to import numpy from
        its source directory; please exit the numpy source tree, and relaunch
        your python interpreter from there.

After some debuging I found out that the numpy can’t access the libstdc++ library ("libstdc++.so.6: cannot open shared object file: No such file or directory")

I checked and the library is installed in: /usr/lib/libstdc++.so.6

So I appointed python to the correct path:
export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH

But I got an:
Segmentation fault (core dumped)

And just gave up.

Cannot make numpy to work. The same thing is happening with pandas but I didn’t even bother trying to debug.

Could it be that you’re installing numpy through nix by adding python packages to dev.nix?

We currently don’t have python packages cached, and that makes the environment loading very slow. I’ve also seen the shared library issue you mentioned.

The following steps should get numpy (and all other python packages that need c libs.

  1. Click on Launch Recovery
  2. Remove all python packages in dev.nix (except for python itself)
  3. Create a virtualenv if it doesn’t exist already (ex: python -m venv .venv)
  4. go to virtualenv (ex: source .venv/bin/activate) and install numpy (pip install numpy)

Let us know if this doesn’t work (also let’s take this to another thread).

1 Like

I deleted the whole project and tried to do the same process again using the virtualenv (as I used before)

I still got the same problem with numpy.

Tried again using these commands:

pip install --upgrade pip setuptools wheel
pip install numpy pandas

Didn’t work.

And when I tried to install a different version:
pip install --no-cache-dir "numpy<2.0"

It worked! I uninstalled the old version and installed the new version (2.2.3) and it worked too.
Don’t know why the roundabout worked but as long as it works it’s okay.

Again, thank you @Alex

1 Like