-
Notifications
You must be signed in to change notification settings - Fork 34
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
"pip install pydnp3" on windows10 #3
Comments
The "pip install pydnp3" is currently built for ubuntu 16.04 and MacOS. Can you try to follow the readme and build it from source to see if you have the same issue? I noticed that Garret made some change to enable building on Windows and with alternative versions of Python, you can check it out to see if it fixes the issue: https://github.com/smartergridsolutions/pydnp3 |
@anhnguyen-cpi Thank u very much for your comments. It has the same error when I try to build the dnp3 from source. I will try Garrent's version. |
Hi, Thanks for the new release for Windows. I have encountered below issue of heap size while compiling on Windows.
Build FAILED. |
The currently build seems to require at least 8Gb free memory. We encounter a similar problem on Linux when running with less than 8Gb. How much memory is available on your build machine? |
@bbarcklay-cpi . The current machine has less than 6Gb memory. I will try with different machine and let you know the result. Thanks for the feedback. |
I have moved my changes for building on Windows to a different repo. The work breaks things into multiple compilation units so you need ~3 GB memory instead of much more https://github.com/garretfick/pydnp3/ You want the branch feature/COMPILE_WINDOWS |
I have also created a pull request so hopefully this can make it into the main repo |
Hi, I'm trying to build pydnp3 on Windows and I used this repo: https://github.com/garretfick/pydnp3/ However, I encounter several errors (same as building the previous repo). I have attached the output I see after running 'python setup.py install'. |
@Kudrat9 Have you tried to build the pydnp3 from https://github.com/garretfick/pydnp3/tree/feature/COMPILE_WINDOWS using ~3GB memory as @garretfick mentioned? |
Yes, I did. But it generated the same errors. Also, I'm running it on my host machine. So, memory is not an issue. I'm running on Windows 10 and I tried Python 2.7 and 3.6. |
I'll take a look but might take a day as I'm travelling. |
I was able to build the project myself, without problems. My steps were to open the project with Visual Studio 2019 and use it's cmake capabilities to build the project. That was successful (albeit with a number of warnings). |
I'm trying to build the project in VS 2017 now. I'm getting the error "Cannot open include file: asio.hpp: No such file or directory" even though I have defined ASIO_HOME as an environment variable. |
The asio.hpp error happens if you have not cloned the submodule in the dnp3
dependency.
…On Thu, Jun 20, 2019 at 12:28 Kudrat9 ***@***.***> wrote:
I'm trying to build the project in VS 2017 now. I'm getting the error
"Cannot open include file: asio.hpp: No such file or directory" even though
I have defined ASIO_HOME as an environment variable.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=AB442KYH5FUE4U4BYDFUY73P3OV2LA5CNFSM4FPRC2SKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYF5ZCQ#issuecomment-504093834>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB442K4TAY6LEDYVZCX7CULP3OV2LANCNFSM4FPRC2SA>
.
|
This is my cmake configure output:
Look like your compiler version is newer and I think you are using msvc_x64. I do see that in my configure, ASIO is checked out as a submodule, whereas yours is not, and the errors seem to be related to ASIO. Can you give that a try and see what happens? I'm not sure if pydnp3 on any platform allows ASIO to not be checked out as a submodule. Perhaps @anhnguyen-cpi can shed light on that case. |
I looked into it but found this: https://groups.google.com/forum/#!topic/automatak-dnp3/hZxt_6hirhY It's just a warning, and the ASIO_HOME tells where asio is located. So, I don't suppose that is an issue. |
I'm not convinced either way with regard to ASIO. Are you able to show the first error from Visual Studio or the complete compile output. I see the screen shot has 11 errors, but there are only 10 in the screen shot you provided. It is also hard to tell which file has the problem without the full output. pydnp3 has very similar file names to opendnp3, so you usually need to see the full path. |
On a separate thread - how did you get ASIO? What version are you using? |
The 11th error was a memory issue. But later, I compiled on a bigger system and it was gone. And these 10 errors remained. I downloaded ASIO from here (and added to the deps folder in dnp3): |
Gut feeling I have is that you are using a different version of ASIO. The version I have for ASIO has the following in
Downloading the latest from the site you linked, I see the following:
So, if |
Oh ok, I'll try using the other version (1.10.8) and see if that works. |
Finally found the version number I have - I think it is 1.10.8. Try downloading that version of ASIO then try again. I do see that the opendnp3 docs say use 1.12.2. I think pydnp3 isn't on the latest version of opendnp3. |
You also asked about my system - my system has 16 GB, but part of that is normally reserved for Hyper-V, so usually at most 14 GB. |
@Kudrat9 did that solve the problem for you? |
The bad news This looks like an issue with opendnp3 (not pydnp3). It has been fixed in opendp3, but I've been unable to find a way automatically solve it here. The good news I need to investigate a bit more about why this isn't happening for Linux and whether I can just update the opendnp3 version, but I hope that should un-block you for now. |
@Kudrat9 I also pushed an update that eliminates the warning about |
I have pushed another update that somewhat solves this automatically. I have fixed Note that if you run via cmake directly (or Visual Studio), then the patch is not automatically applied and you need to do it manually as described above. Hopefully this works :) |
@garretfick Thanks! This worked. I was able to build it both using VS 2019 and python setup.py install. I will install the new update to get rid of the warnings. |
Great. Hopefully @anhnguyen-cpi 's testing passes and then this can be merged and then fix the underlying issue by updating to a newer version of OpenDNP3. |
Should say that I have tried upgrading setup tool, and I am running Windows 10 |
when I use pip install pydnp3 to install pydnp3 package on windows10, there is an error that shows errors as below. Any suggestion? Thx
pip install pydnp3
Collecting pydnp3
Using cached https://files.pythonhosted.org/packages/3d/7b/9da4115503bdce211323caaa12ad7a5128470366a62cdc9c3877549d0be5/pydnp3-0.1.0.tar.gz
Requirement already satisfied: pybind11>=2.2 in c:\program files\python37\lib\site-packages (from pydnp3) (2.2.3)
Installing collected packages: pydnp3
Running setup.py install for pydnp3 ... error
Complete output from command "c:\program files\python37\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\ADMINI
1\AppData\Local\Temp\pip-install-phu88ytc\pydnp3\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\ADMINI1\AppData\Local\Temp\pip-record-w5bs56zh\install-record.txt --single-version-externally-managed --compile:c:\program files\python37\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_ext
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:3 (project):
Generator
The text was updated successfully, but these errors were encountered: