pik-copan / pyunicorn

Unified Complex Network and Recurrence Analysis Toolbox
http://pik-potsdam.de/~donges/pyunicorn/
Other
195 stars 86 forks source link

Unable to install pyunicorn in google collab and windows 10 using anacoda #159

Closed jyotiyadav94 closed 2 years ago

jyotiyadav94 commented 2 years ago

Hi,

I have installed the pyunicorn in the google collab using the !pip install pyunicorn. But I see the below error after installing it.

image

Also i tried installing the package in windows 10. using the anaconda in the base environment the below packages But it doesn't solve my problem i still get the import error. I would like to know how can i use the pyunicorn library.Please let me know the possible solution to use the same

image

image

ntfrgl commented 2 years ago

Hi @jyotiyadav94,

This is a known issue with the previous version, which was resolved recently in a6c4c83. Since these changes are not yet reflected in an official release on PyPI, please try installing from source, i.e., check out the current master branch and execute:

pip install .

I'm tentatively closing this ticket, but please let us know in case you encounter any issues with this approach.

xandie985 commented 2 years ago

Hi Boyan Beronov

I also face a similar issue. I have installed all the requirements as below. When I tried to run the project with the same environment in windows machine visual studio code I see the error .It has a setup.py file as well in the code. But it still has the error.

image

Even after installing the requirements, it gives this error it has been 5 days since i am trying to work on this library. Can you please suggest me something?

I tried to run this code which uses this library - https://github.com/BUAA-WJR/PriceGraph

Requirements :

image

image

image

image

ntfrgl commented 2 years ago

Hi @xandie985,

The answer to your question is exactly the same as the one I gave in my previous comment. In particular, in your screenshot you are using a wheel built from an old version with a known installation problem. If you're interested in successfully installing the library without waiting until the next official release, then you should try to follow my instructions above.

jyotiyadav94 commented 2 years ago

Hi @ntfrgl

I followed the steps mentioned by you. I downloaded the repo master branch.

Since I am using the windows I perform these two steps :

image

Then i get the below errors The wheels are getting failed

image

image

image

Is it possible to schedule the call if you are free? It would be great if you can provide an appointment.

jyotiyadav94 commented 2 years ago

Also, I tried again to install again the wheel file. Python version: 3.7.0 windows 10 * 64 https://github.com/nikfrlv/pyunicorn-windows-whl

I see the below error

image

image

jyotiyadav94 commented 2 years ago

okay @ntfrgl

I was able to fix the issue just by deleting the file C:\Users\jyoti\anaconda3\envs\pyunicornLib\Lib\site-packages\pyunicorn init.py file as a workaround I was able to run my test properly. This resolved my issue

Thanks for your time.

ntfrgl commented 2 years ago

Hi @jyotiyadav94, I'm glad that you've found a workaround, even though it's using the old version of pyunicorn.

In both of your attempts above, you can see that the problem is the following:

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

This is a general issue with compiled Python packages on Windows, and not specific to pyunicorn. As you can see by searching on the web, many people have faced this same issue and were able to resolve it simply by following the instructions provided within the error message. For a more detailed explanation, see, e.g., this video.

I don't have access to a Windows machine and can't test it, but if you could let us know whether this solution works for you with the latest master version, then we could improve our installation instructions to help other Windows users.